OnEntityTickUpdate possibly running multiple times per tick

Started by buzzer on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 17:20, 12. Oct 2024
Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
OnEntityTickUpdate possibly running multiple times per tick

I have a procedure for OnEntityTickUpdate to count the number of ticks elapsed until it reaches 140 ticks (7 seconds) and play a sound when it does. Problem is, whenever it reaches 140 ticks, the sounds plays twice, despite resetting the timer before playing the sound. I double checked the code and made sure the procedure wasn't being called somewhere else. The only reason I can think of that this would be happening is if, for some reason, the script is running twice per tick at the same time. I'd post the code, but there's a rule against posting screenshots.