floor damage tiles help (Ace)

I am using the generic floor damage terrain flag and am in need of some help in 'temporarily' stopping the damage from occurring without actually swapping the tiles around.

So I am wondering if there are any script calls that help me out.
there is no script call for this, but the basic floor damage is defined in a function, and you can rewrite that function.

Game_Actor, Line 650 to 655

In default, this allways returns 10.

You might add a line before "return 10" to condition this, for example If $game_switches[99] return 0

(I haven't checked the syntax, the correct commands might be different)

That way the floor damage would stop if you use an event command to switch the switch #99 to ON.
That would work. Just need to find the right syntax. Any help with that would be great.
In execute_floor_damage, I would just add return if $game_switches[99] as the first line in the method, so it doesn't even bother doing a calculation.
That worked perfectly. Thanks. This topic can be closed now.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/floor-damage-tiles-help-ace.16013/