How do I make a variable that every second it will add a number to it (timer)

Started by Lavlav1808 on

Topic category: Help with MCreator software

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make a variable that every second it will add a number to it (timer)

I want to make a sword that if you in water and holding it, it will give you dolphin grace, strength, and conduit power. Also it will start a timer that every 30 seconds, it will give you instant health and if you leave the water or hold something else it will reset the timer.

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
make a global variable of…
Sun, 03/02/2025 - 18:37

make a global variable of type number and scope player_lifetime:

then inside your tool's triggers add a new toolinhandtick and make this procedure:

i didn't make it reset each time you hold another item, but you can do that yourself just by making a new global procedure that changes watereffect for each tick depending if you're in water or holding an specific item

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your pictures doesn't work
Mon, 03/03/2025 - 12:11

Your pictures doesn't work

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Now it works
Mon, 03/03/2025 - 12:11

Now it works

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It don't work
Mon, 03/03/2025 - 12:54

It don't work

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh it actualy worked! Thank…
Mon, 03/03/2025 - 13:03

Oh it actualy worked! Thank you!