Main Menu

is there a way to get a characters death to trigger abort battle?

Started by bum199, May 24, 2011, 05:20:38 AM

0 Members and 1 Guest are viewing this topic.

bum199

Hello i am trying to figure something out in rmxp. I'm using gubids tactical battle system and i know how to set it so if one actor dies its a failure.  But i want it to resuslt in failure if someone else dies.  Not if they both die ine the battle or what i mean is they wouldnt both have to die to trigger it..  But either of them could trigger it.  i don't really know what i'm doing and would appreciate help. i thought maybe there was  a way for the death of a character to trigger abort battle but i dont know how to set that up.

pacdiggity

1. Set a variable to each of the characters' HP through the control variables command.
2. Set a conditional branch in your battles to check if any of the variables are equal to 0.
3. Inside the conditionals make the command to exit the battle. Make sure the event is parallel process running whenever a battle is happening. An easy way to do this is have a parallel process common event running with a switch trigger that you activate whenever a battle is happening, and turn off when it ends.
it's like a metaphor or something i don't know

bum199


pacdiggity

Go into the database and open up the common event tab. Make a new one, and make it 'Parallel Process' and set the switch trigger to one that you haven't used yet. In event commands, you'll see the control variable option on the first page. Go into it, and set 1 variable to equal each actor's HP. There is an option for this. This means if you have 4 actors, you'll need 4 variables.
Next, make a conditional branch (also on the first page in event commands) to check if one of the variables is equal to 0. That option is the second one on the first page of the conditional selections. Uncheck the else box, you won't be needing it. Inside the branch, run an 'Abort Battle' or 'Gameover' command as you deem fit. Make a branch for each of the variables.
it's like a metaphor or something i don't know

bum199

i think i understood all that except how to set variables to hp and how to check the variable after that.advice would be appreciated.

pacdiggity

I have attached an example to help you figure it out. This is the control variables window.
it's like a metaphor or something i don't know

bum199

ok when i check if the variables are eqal to 0 do i chck constant or variable? i think i understand now

pacdiggity

it's like a metaphor or something i don't know

bum199


pacdiggity

It should be set up:
@>Conditional Branch: Variable [XXXX: Actor HP] == 0
    @>Abort Battle
    @>
:  Branch End

If you're having trouble setting up the branch itself, there's another attachment.
it's like a metaphor or something i don't know

bum199

is this all supposed to be on one event page? i have it split up in 2 right now

pacdiggity

One page, common event, parallel process. You'd have to activate it by turning on the trigger switch though. The reason you need a parallel process is because you want to constantly update all of your HP variables.
it's like a metaphor or something i don't know

bum199

i have no idea what im doing wrong. it still takes both actors deaths. heres a screen of the event maybe that shows what im doing wrong. i can post the common event pic too if you like. never mind i found  a way.

[attachment deleted by admin]