[RMVX ACE] DETECTING DEATH OF AN ACTOR

Posts

Pages: 1
Hey all,

So I've been mulling this issue for a while, since its a major roadblock between me and a release of a build that's not balance-only.

I need a way for the game to A) Realize that an actor is dead (easy enough, parallel event that detects dead state), B) Remove them from the party (again, easy enough), and C) Let me know -which- actor died. (The hard part), and finally D) Change a variable specific to that actor.

The brute force way of doing this is a giant If chain check, if(actor1) then change (variable for that actor). I keep brute forcing things though and finding much more manageable things later, so I thought I'd toss this out if anyone has any ideas for a better way to implement this.

(Obligatory death of a salesman joke here)

Thanks in advance!
is the actor permanently dead? nvm
but have you tried using switches instead
Needs to be a variable at this point, besides a myriad of other reasons, The characters will have multiple states. 'Not recruited' 'recruited' and 'dead'. Need to keep track of them because various events will trigger or not depending on the character states.
Marrend
Guardian of the Description Thread
19479
Why do you need to change a variable after an actor dies? If you are checking to see if an actor is dead, would you not already know who it is that's dying?

I'm thinking mostly in terms of the function call of "$game_actors[actor_id].death_state?" on this point, and I may not be entirely on the ball here.
Was trying to not get into too much detail about it for fear of leadening the mechanics with the broader implications but...

The game is going to have a lot of interplay between various mechanics, and I need to keep track of whether the player has recruited a character/actor, if they are currently recruited, and if they have died. The recruited/not part is important for various dialogues and mission availability, the dead part is important to character interplays and character events that will allow them to grow.

In example, a pair of characters are recruited together. All their story events are available normally, except the last one, which requires the other one to be dead, which finishes their story, and unlocks a new ability to replace the one thats useless due to their lack of partner.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3329
Are your variables all in one block and is the operation always going to be the same regardless of actor?
Yeah, aiming for all the actor recruited/dead variables to be in one large block, and the action for this particular event will just be to set the variable for that actor to 2 (0 being non-recruited, 1 being recruited, 2 being dead). I figured there was some way to call the actor's ID as a value, and then add a set amount to it to get to the right spot in the variable block, but wasn't sure the exact way to call it in VXACE.

My headcode for it was something like:

if(actor_state=death)
A = actor_id
A = A+20 (to reach the right variable block wherever it is)
variable(A) = 3

Just not sure how to specify actors triggering the state in ruby, and the exact callouts.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3329
starting_var = 20
for i in 1..$data_actors.size - 1
  $game_variables[starting_var] = 2 if $game_actors[i].death_state?
  starting_var += 1
end
That looks right to my lacking knowledge of Ruby, I'm assuming it would be a script call inside an event that detected someone had died for best results, correct?
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3329
If you make it a parallel event it'll just update the variables every frame without having to do anything further.
Thanks, so just to clarify: The difference between autorun and parallel is that autorun goes over top of everything else (so for example, displaying a message as soon as the map is loaded or when a trigger is hit), while parallel doesn't stop gameplay until something requires player input, like a text or choice?
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3329
Yeah, a parallel process common event will run alongside all other processing as long as its trigger switch is turned on.
Pages: 1