i need help with a cooldown for an entity

Started by thijs_films on

Topic category: Help with MCreator software

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i need help with a cooldown for an entity

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!

Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you can use "on entity tick…
Sun, 05/02/2021 - 00:18

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?

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i would make it that all…
Mon, 05/03/2021 - 12:27

i would make it that all players share the same cooldown.

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok, so it's not working…
Mon, 05/03/2021 - 18:08

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!!

 

Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what I understand is: (I…
Mon, 05/03/2021 - 18:32

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?

 

 
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes. that is what it does…
Mon, 05/03/2021 - 18:38

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.

Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I will do a similar…
Mon, 05/03/2021 - 18:55

I will do a similar procedure and try it out

 
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok! goodluck!
Mon, 05/03/2021 - 18:56

ok! goodluck!

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it also worked for me!!…
Mon, 05/03/2021 - 20:19

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!