Started by
thijs_films
on
Topic category: Help with MCreator software
i have an entity that gives you an effect when you collide with it. but as of now you can basically spam it to constantly get the effect, which is not what i want.
how can i add a colldown so you have to wait a said amound of time before you can get the effect again.
any help is appreciated!
you can use "on entity tick update" (this would make the cooldown shared, if one uses it all players must wait)
or also per player (each player would have his own cooldown).
Which one will you use?
i would make it that all players share the same cooldown.
https://imgur.com/a/7vcKx00
ok, so it's not working. probebly because i dont fully understand how it works-
i'm sorry for not fully understanding and being a bit hard to work with, so to maybe give you a clearer view of whats going i've compiled everything i got and where it's placed in this one image! https://imgur.com/a/0xT1TYe
but so far i really appreciate you helping me, thank you verry, verry much!!
what I understand is: (I will not include sounds or particles).
If you have the entity tameada:
you have 20% that it will give you regeneration and remove the "dread" effect, the cooldown is reset.
you have 20% that it will not give you anything and will reset the account
you have 20% and if the player has low level food he will give you two heavies and the count will be reset.
you have 20% chance that he will not give you anything and the account will be reset
the rest of the time the account is restarted
if you don't have the entity tamed:
the cooldown of 100 ticks is reset causing 1 damage.
everything seems to be ok, nothing works?
yes. that is what it does
but for some reason when i tested it out it still kept spamming every action with starting the countdown.
but all action it needs to do when checking certain things it does correct, like when the food level is low i get the two salmon and if i'm at full hunger i dont.
i thought maybe that is because i only have this in the "when player collides with entity" trigger. and nothing else.
but im not sure.
I will do a similar procedure and try it out
ok! goodluck!
it worked
It probably didn't work before because of if inside if inside if
https://imgur.com/a/3RP2VFS
it also worked for me!!
thank you so much! you've been a great help and i really appreciate it!
i couldn't have done it without you.
have a good day/night/afternoon!