Potion effect that kills you unless cured

Started by 2002luis on

Topic category: Help with MCreator software

Joined Mar 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Potion effect that kills you unless cured

I am making a mod with an item that gives you a potion effect. This effect will kill you at the end. I want to make an item that will remove this effect without killing you. However, I can find no way of removing one specific potion effect, only of removing ALL of them. Also, the negative effect only has 2 seconds even though I said 60.

Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried to solve this…
Wed, 01/01/2020 - 19:11

I tried to solve this problem, i hope you thought it like this.

(My solution DOES NOT remove the potion effect, but makes it harmless).

The negative effect only lasted around 2 seconds, because the set in the procedure is determined with Ticks.

20 Tick = 1 second, that means if you want to set the effect's time to 60 seconds, you have to write 1200 in the procedure.

 

You can do the following in any order, It doesn't matter, i just did it this way.

1. I made a potion element named 'Deadly Effect'.

2. Next I created a Global Variable named 'CureClicked'. The variable type is logic, the Variable scope is GLOBAL_WORLD and it's initial value is false.

3. Then I made a  procedure for this, let's call it just DE_Procedure (DE = Deadly Effect).

(In the picture I set the entity's health to 1 for testing, but if you want it to kill you, you have to set it to 0)

If you do not see the image please tell me.

4. I selected the procedure(DE_Procedure) in the Potion element(in my case 'Deadly Effect') 'When potion expires'.

5. I made an item which I called 'Cure Stick'.

6. I made an another procedure called 'Click'

- It is a simple procedure It just sets the variable, Global:Clicked to true.

7. Then I selected this newly created procedure('Click') in the in the Cure Stick's procedure page, 'When right clicked in air', but you can also select this in the 'When right clicked on block', to make sure it happens.

 

Overall It does not removes the potion effect, but it won't kill you at the end of it's time. I hope it helps you.

If it still doesn't work, then I will comment it again, but with more pictures.

 

 

Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay I see it doesn't shows…
Wed, 01/01/2020 - 19:34

Okay I see it doesn't shows my picture so I will just write it down.

it will probably look stupid.

Procedure starter: No additional trigger

if 'Get Global: CureClicked = true'  (There are 3 parts, each of them are light blue procedure parts, find these in the Custom variables, Logic operations, Logic and Loops sections, in this order from left to right)

do 'Set Global: CureClicked = false'

else 'Set Health of the provided entity to 0'  (you can find this in the Entity section)