Help - Search - Members - Calendar
Full Version: Simple Battle Abortion with a Lose
RPG RPG Revolution Forums > Scripting > Event Emporium
AphidRuin
Engine: RPG Maker XP

Is it possible to abort a battle, by making it a lose?

Help is appreciated. Thanks smile.gif
Redd
Umm... can you rephrase that a bit??
Do you want it like, if you lose the battle something else happens instead of just the game over screen?
AphidRuin
Sorry about my poor English. sad.gif
What I mean is that, when you make an event and a Battle Processing command in it, you can check the box 'Continue if Lose' and it will branch you something like this:

Battle Processing : Ghost*2
If win
>
If Lose
>

What I want in my game is that, after holding ground for 10 turns, I want it to abort battle in such way that the even continues with the 'If Lose' commands. If the party win the battle is game over.

But in the default engine itself, if you abort battle in such situation, the whole event repeats, For example:
Text: Blah
Battle Processing:Ghost*2
IF Win
> Game Over
If Lose
> Text: Just kidding

If I go to 'Troops' in the database, and at the battle event I make it:
Turn 10
>Abort Battle

It repeats the event from the start. Meaning Text: Blah and the battle again instead of showing 'Text: Just kidding'

Thanks for your help smile.gif

brewmeister
QUOTE (AphidRuin @ Apr 3 2011, 01:44 AM) *
Text: Blah
Battle Processing:Ghost*2
IF Win
> Game Over
If Lose
> Text: Just kidding

If I go to 'Troops' in the database, and at the battle event I make it:
Turn 10
>Abort Battle


With that setup, the behavior should be:

If you Win before turn 10: Game_Over
If you Lose before turn 10: "Just Kidding"
If you get to turn 10 & 'abort: Nothing. Back to map.

"Abort Battle" will use the "If Escape" branch if you select "Can Escape" in the Battle Processing event command.
Ale Goth
The event that starts the battle must be a parallel process or autorun if it runs again after aborting the battle. It has to reload the map again I believe...
So to fix this, set switch "x" to true in the troops database before you activate abort battle.

Now in the event that does this...
QUOTE
Text: Blah
Battle Processing:Ghost*2
IF Win
> Game Over
If Lose
> Text: Just kidding

After that add this below...

Add a conditional branch if switch "x" is true...

IF (x) true
> (Nothing)
ELSE
> Text: Just kidding
> Set switch "x" to true

Add Label "END" at the end of the page. (I'm not sure if labels are in XP...o_o)
Add "Erase Event" after the label (I think this is available in XP)

Now before the "Text: Blah" at the beginning. Add a conditional branch that does so...

IF (x) true
> Jump to label "END"
ELSE
> (Nothing)

All together this is what it should look like

QUOTE
IF (x) true
> Jump to label "END"
ELSE
> (Nothing)

Text: Blah

Battle Processing:Ghost*2
IF Win
> Game Over
If Lose
> Text: Just kidding

IF (x) true
> (Nothing)
ELSE
> Text: Just kidding
> Set switch "x" to true

Add Label "END"
Add "Erase Event"


Seriously I apologize in advance if some of these options are not in XP. I'll have to get it again sometime soon.
dry.gif

<Edit>:(if you want to make him disappear->) If the event has an image and you talk to him then....uh, you'll need a 2nd page and stuff...~ unsure.gif
AphidRuin
QUOTE (brewmeister @ Apr 4 2011, 09:27 PM) *
QUOTE (AphidRuin @ Apr 3 2011, 01:44 AM) *
Text: Blah
Battle Processing:Ghost*2
IF Win
> Game Over
If Lose
> Text: Just kidding

If I go to 'Troops' in the database, and at the battle event I make it:
Turn 10
>Abort Battle


With that setup, the behavior should be:

If you Win before turn 10: Game_Over
If you Lose before turn 10: "Just Kidding"
If you get to turn 10 & 'abort: Nothing. Back to map.

"Abort Battle" will use the "If Escape" branch if you select "Can Escape" in the Battle Processing event command.


I mean that, if you "Abort Battle", it will replay the autorun command from the start again instead of continuing. It is a ground-holding boss battle, thus there must not be "Escape option".
brewmeister
QUOTE (AphidRuin @ Apr 5 2011, 06:20 AM) *
I mean that, if you "Abort Battle", it will replay the autorun command from the start again instead of continuing. It is a ground-holding boss battle, thus there must not be "Escape option".


That is what "Autorun" is supposed to do. You need to interrupt it if you only want it to run once.

Try this:

Page 1: Autorun
Text: Blah
Battle Processing:Ghost*2
IF Win
> Game Over
If Lose
> Text: Just kidding
> Set Self-Switch B = ON
>
Set Self-Switch A = ON

Page 2: Autorun, Condition: Self-Switch A is ON
> <put your Abort commands here. this page will only run if you abort.>
> Set Self-switch C (or erase event)

Page 3: Autorun, Condition: Self-Switch B is ON
> <Put your "lose" actions here. This page only runs if you lose>
> Set Self-switch C (or erase event)

Page 4: Action Button, Condition: Self-Switch C is ON
> <after all is done, this empty page does nothing>
AphidRuin
QUOTE (brewmeister @ Apr 6 2011, 02:39 AM) *
QUOTE (AphidRuin @ Apr 5 2011, 06:20 AM) *
I mean that, if you "Abort Battle", it will replay the autorun command from the start again instead of continuing. It is a ground-holding boss battle, thus there must not be "Escape option".


That is what "Autorun" is supposed to do. You need to interrupt it if you only want it to run once.

Try this:

Page 1: Autorun
Text: Blah
Battle Processing:Ghost*2
IF Win
> Game Over
If Lose
> Text: Just kidding
> Set Self-Switch B = ON
>
Set Self-Switch A = ON

Page 2: Autorun, Condition: Self-Switch A is ON
> <put your Abort commands here. this page will only run if you abort.>
> Set Self-switch C (or erase event)

Page 3: Autorun, Condition: Self-Switch B is ON
> <Put your "lose" actions here. This page only runs if you lose>
> Set Self-switch C (or erase event)

Page 4: Action Button, Condition: Self-Switch C is ON
> <after all is done, this empty page does nothing>

Thanks for that. I will try it soon tomorrow. I mean thanks to both Mr. Ale Goth and Mr. brewmeister
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.