When entity walks on block run procedure once.

Started by BlockSmart on

Topic category: Help with modding (Java Edition)

Last seen on 14:56, 30. Mar 2023
Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When entity walks on block run procedure once.

I'm trying to make my teleporter detect an entity above it, run the animation and wait, and then teleport.  However, it will run the animation and teleport me over and over because the procedure keeps running.  Here's what I have right now.  Any idea on how to fix it? Thanks.

Last seen on 10:28, 30. Oct 2023
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You should add a cooldown to…
Wed, 02/15/2023 - 16:18

You should add a cooldown to the detector.

Like a variable "isInCooldown" is originally false.
Once the procedure ran, the variable turn to true.

Now, instead of mafkink the procedure first check if if the player is above, you make it check if the cooldown variable is true .
If it is, you do a "Wait 40 ticks", if no you check if the player is above.