How to Enable and Disable Event Tick ?

Is there a way to enable Event tick only when it’s needed and have it disabled when you don’t need it? for example ( Let’s say i fall in lava and my event tick is checking to see if i am in lava so it can start taking life away
but if i jump out of the lava it stops draining life and not have it always in the background waiting till i am in lava again )?