How can I stop my Event Tick from firing?

For anyone else who has this question, there’s alot of options for handling this.

(Leaving Tick Running But Skip Processing Additional Code)
If you perform a bool check you can branch it to skip processing the rest of your code.

(Destroy the Original Pawn Object During Possession Transfer)
If you are taking control over another pawn from object then you can Destroy the original pawn object which will shut off it’s tick and you can carry on using the next possessed pawn. If the object is destroyed it is no longer ticking.

(Timer Based Value Check Method)
You can use a timeline or setup a timer and then clear the timer to finish performing checks.

(Behavior Tree AI Feedback Method)
You can set up your project using Behaviour Tree’s to handle the value references for the movement calculations.

(Disable Actor or Component Tick Directly)
For an actor you can use the Set Actor Tick Enabled value to False, or in a component Set Component Tick Enabled to False, if you use this method I recommend adding a Delay Node because you might experience an overrun condition that fires the Event Tick twice one time before it is totally disabled so it doesn’t process the code a second time, you give the setting enough time to be applied.

Performance Thoughts:
As for which would give the best performance option, if you don’t run in a constant check loop and aren’t checking at all the better, such as by destroying the object would be the better approach if this is focused more heavily on game logic or has a graphical with logic impact, and if the object is checking until a temporary condition and the result is long term where the object doesn’t get destroyed and you expect multiple copies then using a timer based approach would probably be better as you could easily start up the timer again and calculate without a delay.

2 Likes