[RMMV] [SCRIPTING] CONDITIONAL BRANCH ENEMY MP
Posts
Pages:
1
Should be simple, but I need a script call that basically says:
IF enemy 1.mp (as in enemy index one) > x, then add state y
IF enemy 1.mp (as in enemy index one) > x, then add state y
I'm not sure how it would translate in MV, but, in VX Ace, something like that would look like...
...this, I'm pretty sure.
*Edit: My guess is that MV has something akin to the Game_Troop class, and generally has a similar structure for how it keeps track of game-data. Could be wrong!
def mp_check(index, value, state_id) actor = $game_troop.members[index] if actor.mp > value actor.add_state(state_id) end end
...this, I'm pretty sure.
*Edit: My guess is that MV has something akin to the Game_Troop class, and generally has a similar structure for how it keeps track of game-data. Could be wrong!
author=Marrend
I'm not sure how it would translate in MV, but, in VX Ace, something like that would look like...
def mp_check(index, value, state_id) actor = $game_troop.members[1] if actor.mp > 20 actor.add_state(6) end end
So I typed it in like this, and when I tested it it came up with "Syntax error; unexpected identifier".
That makes sense. If it worked on an as-is basis, I would be pretty surprised!
So, for MV, it might look something more like...
...this? Though, I must admit that, as I don't have access to MV, I cannot be sure about the references to "$game_troop", of the associated functions I'm using here.
Sorry for not being able to help more!
So, for MV, it might look something more like...
mp_check = function(index, value, state_id) { actor = $game_troop.members[index]; if actor.mp > value { actor.add_state(state_id); } };
...this? Though, I must admit that, as I don't have access to MV, I cannot be sure about the references to "$game_troop", of the associated functions I'm using here.
Sorry for not being able to help more!
Pages:
1














