Scripting for States

OK, so I have been playing around with a plugin to get some custom states to work, like negative healing and instant death, but once again I have no idea how the engine is managing the plugins

I'm not crashing or anything, the code works, but my checks seem to be false (if(stateId === Gamma.Param.InstaDeath && Gamma.Param.InstaDeath !== 0))

If somebody be able to point me in the right direction with setting this code right it be much appreciated

GEP_StrangeStates.txt

Anybody can feel free to use this code

Edit: Fixed

For anybody who is after Zombie state (healing causes damage) or Instant Death State here's the now working code (free use for both commercial and non commercial projects)

GEP_StrangeStates.txt
Are you debugging it?  I imagine it would be easy to check what is in Gamma.Param.InstaDeath and what is in stateId.

F8 is the debugger if running from the editor, or F12 if running on a web page.
Ok, I'm really dumb, had and extra ')' just sitting in there throwing an error and stopping the plugin

Original thread: https://forums.rpgmakerweb.com/threads/scripting-for-states.48197/