Hello everyone!
Today I was working on my project and I came up with an idea for a character. Basically, when the character is killed in battle, I want to have them instead of dying, entering a state that keeps them alive but just weaken. I have the state but I'm not sure how to apply it to the 2 characters that have this special state. I figure it can be entered into the system via scripting but I'm not sure how the live of script should look.

I think I add the state in this line here.
Would my line look like;
(@hp == 0) ? add_state(death_state_id) || add_state(avoid-death_state_id[1].include?(@actor_id))) : remove_state(death_state_id)
I'm not really sure so any help would be greatly appreciated. Thank you!
Today I was working on my project and I came up with an idea for a character. Basically, when the character is killed in battle, I want to have them instead of dying, entering a state that keeps them alive but just weaken. I have the state but I'm not sure how to apply it to the 2 characters that have this special state. I figure it can be entered into the system via scripting but I'm not sure how the live of script should look.

I think I add the state in this line here.
Would my line look like;
(@hp == 0) ? add_state(death_state_id) || add_state(avoid-death_state_id[1].include?(@actor_id))) : remove_state(death_state_id)
I'm not really sure so any help would be greatly appreciated. Thank you!