Procedure bugged when kill a mob via rest is HP

Started by a guy called l… on

Topic category: Help with modding (Java Edition)

Last seen on 23:35, 30. Oct 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedure bugged when kill a mob via rest is HP
Wed, 04/13/2022 - 17:18 (edited)

Let me explain, I make a boss that have 3 parts, each one being a individual mob, and I have a sword that dealth +1 half a heart each 25 hearts the mob have

At the start that dont work due inmunity frames blocking the "deal X damage of type generic", so I decided to use the next procedure:

Set HP to [get HP] - X

that procedure ignores inmunity frames, but has a problem

if the mob dies because that procedure, the "when a mob die" procedure will not work

I discover this because when you kill 1 segment of my boss all other dies instantaly, but when I kill the boss with the new sword, normaly the other segments dont dissapear, but when I kill it with a normal sword, the segments dissaparear

any solution?

Edited by a guy called lonchor12 on Wed, 04/13/2022 - 17:18
Last seen on 05:05, 30. Oct 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Add a check for "If X > [HP]…
Fri, 04/15/2022 - 04:58

Add a check for "If X > [HP] , set X to [HP] -1"

This should leave your boss at 1 HP and the base weapon damage should be plenty enough to kill it.

Last seen on 05:05, 30. Oct 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Add a check for "If X > [HP]…
Fri, 04/15/2022 - 05:06

Add a check for "If X > [HP] , Set [HP] to 1"

 

Last seen on 23:35, 30. Oct 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did that, I got an a idea…
Fri, 04/15/2022 - 15:16

I did that, I got an a idea to evade the boss getting at 1HP everytime (as is anoying)

I think on the idea, but I miss one part

 

If [HP] < X do

Wait {here is what i miss, the time that took a mob to lose is inmunity}

Deal X damage to <event entity target>

 

If I got how to get the inmunity frames of the mob, I can kill it once the inmunity is over

(Procedure of damage isn't bugged)

The problem of my weapon is the base damage goes first, and then the extra damage, but that is my idea

Also and this is probably a bug, /kill also bug "when a mob die"

Other idea I have, but I don't know if is posible, is kill it via procedures, not sure if theres a procedure for do that

Last seen on 23:35, 30. Oct 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Or also I can make the extra…
Fri, 04/15/2022 - 15:19

Or also I can make the extra damage first, and then the base one

The problem gonna be when I make a weapon that only do damage via procedure