Applying Character State on Death

Kloqdq

Villager
Member
Joined
Jun 30, 2016
Messages
5
Reaction score
0
First Language
English
Primarily Uses
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.


Scripting help.png


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!
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top