- Joined
- Jul 25, 2013
- Messages
- 124
- Reaction score
- 18
- First Language
- English
- Primarily Uses
I've noticed some scripts have a "reference" I guess you could call it, in this form GameScript > GameSubScript, or something like that. Does that cause the script to add its code to that file? Can that be used to "insert" the code in between certain lines?
I've been putzing around with an 'auto-life' state that automatically revives the one affected once they die (and removes the state). I tried it with eventing (using immortal status and checking if hp is below 0), but it wasn't doing what I wanted it to.
I kind of figure I can insert the script code in between lines 150 and 151 of the Game_Battler Script (the lines @hp = 0 and clear_states). The code would be something to the effect of (the following is pseudo code):
- check state for 'auto-life' state using actor.stateid[#]? (I think is the 'proper' conditional)
- if true, then remove death state
- recover hp (around 50% or mhp / 2)
- remove auto-life state
- stop the knock out function (I'm not quite familiar with the Ruby term for this, but simply stop it from clearing states and buffs and declaring the target dead)
- if false, then let the knock out 'function' continue as normal.
I'm reading through the 'Help' file to try and understand the syntax (the only programming I am familiar with is Basic and C-based programming, which have different keywords and syntax). Any help understanding Ruby, would be greatly appreciated.
The problem I foresee is that it would still "knock out" the character even if brought back to life.
I've been putzing around with an 'auto-life' state that automatically revives the one affected once they die (and removes the state). I tried it with eventing (using immortal status and checking if hp is below 0), but it wasn't doing what I wanted it to.
I kind of figure I can insert the script code in between lines 150 and 151 of the Game_Battler Script (the lines @hp = 0 and clear_states). The code would be something to the effect of (the following is pseudo code):
- check state for 'auto-life' state using actor.stateid[#]? (I think is the 'proper' conditional)
- if true, then remove death state
- recover hp (around 50% or mhp / 2)
- remove auto-life state
- stop the knock out function (I'm not quite familiar with the Ruby term for this, but simply stop it from clearing states and buffs and declaring the target dead)
- if false, then let the knock out 'function' continue as normal.
I'm reading through the 'Help' file to try and understand the syntax (the only programming I am familiar with is Basic and C-based programming, which have different keywords and syntax). Any help understanding Ruby, would be greatly appreciated.
The problem I foresee is that it would still "knock out" the character even if brought back to life.
