MCreator-Examples / Feedback

The Feedback Repository is a place where the community can suggest ideas for future videos. In some cases, I will pick things from this repository if I feel motivated or have an idea of how to add them.
https://github.com/MCreator-Examples
6 stars 0 forks source link

Ability Cooldowns #1

Closed KevTG closed 3 years ago

KevTG commented 3 years ago

can you make a tutorial on how to make a weapon trigger procedure cooldown?

Example:

I have made a sword in Mcreator with a lightning strike ability. Right now i have a randomizer to make it 5% chance to trigger the ability when a living entity is hit, but i would much rather have so i can use the ability when i want to, and have a 2 minute cooldown before i can use it again, but i dont know how to make that:)

northwesttreesgaming commented 3 years ago

image

I have covered how to make timers using global variables however it is also to do the same mechanics with any NBT variables as well. Items have NBT variables so you only need to make a simple item NBT timer for the item tick update, test if the value is greater than 0 if there then count down to 0.

When the tool is used you need to set the timer as seen in the procedure below the first one.

You should also test if the timer is = to 0 to be able to use the timer.

I don't see the need right now to update the tutorial as the concept from my past tutorials regarding timers still works fine except for not including that NBT variables do work fine for timers as well. You can use a player side global timer as well if you don't want the item to update from the NBT data just make sure to test for the global variable instead.

I will add the suggestion to the video update section for the project.

northwesttreesgaming commented 3 years ago

Published https://youtu.be/gTbWiMu-M-0