How do you Make a Self Destruct Ability without Dying?

Started by A_Creativeuser… on

Topic category: Help with modding (Java Edition)

Last seen on 12:02, 12. Jun 2023
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you Make a Self Destruct Ability without Dying?

I'm working on an armor set ablility for my mod, you're supposed to self destruct by pressing a key, damaging mobs around you. The Problem is, You also Die in the process. Any way to fix this?

Last seen on 10:28, 30. Oct 2023
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could try to health…
Wed, 02/15/2023 - 16:12

You could try to health boost the player at the moment of the explosion ?

If you boost just the explosion damages the player health should stay the same

Last seen on 12:02, 12. Jun 2023
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Should I put the block which…
Thu, 02/16/2023 - 07:26

Should I put the block which adds the health boost before the explosion block or after?

Last seen on 10:28, 30. Oct 2023
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Health boost for 20 tick >…
Thu, 02/16/2023 - 10:01

Health boost for 20 tick > Explosion > Health boost end

I think

Last seen on 17:39, 23. Apr 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a different Procedure…
Thu, 02/16/2023 - 13:59

Make a different Procedure where you check if someone is going to die with a Global player Variable to check if it triggered.

Then cancel it. with this is more secure way of doing this :)

Last seen on 12:02, 12. Jun 2023
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ooh ok, thanks! Ill try to…
Fri, 02/17/2023 - 13:26

ooh ok, thanks! Ill try to make something similar

Last seen on 15:27, 23. Apr 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sooo... You're wearing an…
Fri, 02/17/2023 - 16:00

Sooo...

You're wearing an explosive... And you expect it NOT to kill you?

I mean, it follows minecraft logic a bit...

Last seen on 12:02, 12. Jun 2023
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Its supposed to help you get…
Sat, 02/18/2023 - 04:56

Its supposed to help you get out of sticky situations but it would be quite funny if i made a seperate set which does kill you

Last seen on 17:39, 23. Apr 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here are the Steps to make…
Sat, 02/18/2023 - 09:44

Here are the Steps to make it work:

  1. Make a Global Player logic Variable with the Type Player Persistent (if you want to not reset if the player dies, otherwise select the other type that also beginning with Player) - Also set the Variable by default to false.
  2. After that go to the Procedure that will be triggered if you press the key and set the Variable to true
  3. Then after that make a Procedure with the Global Trigger "Entity dies" and check if the player variable is true.
  4. If the Player Variable is true, set the player variable to false again and go to the Category "Advanced". In there you will need a Procedure Block with the Name "Cancel event that triggered global trigger". Use this after the set variable block
  5. You're Done!