Event after escape?

Status
Not open for further replies.

Beniwa

Villager
Member
Joined
Dec 24, 2012
Messages
23
Reaction score
0
First Language
English
Primarily Uses
I'm having a bit of a problem with this one. So, thanks to Tsukhime, I was about to use a script to run commands after a battle end in victory, as well as in defeat (with 'continue Even When Loser' mode on).

I am wondering if it's possible to run an event after the battle is aborted, before returning me to the overworld, or if I can turn escaped into defeated, to run the same event/script for a defeated condition. 
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
You can't do that in the default engine, you'd have to modify it with scripts to run an event before it exits the battle.
 

Beniwa

Villager
Member
Joined
Dec 24, 2012
Messages
23
Reaction score
0
First Language
English
Primarily Uses
Figured as much. Getting this battle system to work is becoming a huge headache, and I couldn't find any script that is something like it... 
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
I am wondering if it's possible to run an event after the battle is aborted, before returning me to the overworld,. 
This may not be what you are looking for - since technically you are being returned to the over world.  But what you might want to try is turning on a switch in your battle event before aborting the battle that triggers an auto run event on your map.  That will let you run an event right after a battle is aborted.
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Just go to BattleManager, to where it says def self.process_abort (line 235), and shove in a reserve_common_event script call.
 

Beniwa

Villager
Member
Joined
Dec 24, 2012
Messages
23
Reaction score
0
First Language
English
Primarily Uses
Thanks Kerbon. I also just figured out that in the Database, under Skills, 006 is Escape, and you can modify the Effect to the side to call a common event. Lol. /facepalm. The more you know~ 

Seems like Escape in that instance is only as a spell. I have no idea how to use that reserve_common_event script call though...

This may not be what you are looking for - since technically you are being returned to the over world.  But what you might want to try is turning on a switch in your battle event before aborting the battle that triggers an auto run event on your map.  That will let you run an event right after a battle is aborted.

 
Also the reason I can't do this is because I need to run the script before I am returned to the overworld, so my sprite doesnt flicker (i am removing a party member before the fight begins in combat, and removing him at the end before victory screen runs or defeat/abort
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
Seems like Escape in that instance is only as a spell.
No.

If you read the description of that escape skill, you'll see that it is intended for enemy use only.

The player/actor uses a different function to escape, one that is not directly accessable.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Can you please add a link to the script you're using?
 

Beniwa

Villager
Member
Joined
Dec 24, 2012
Messages
23
Reaction score
0
First Language
English
Primarily Uses
Thanks for that Shaz. 

So I'm taking a look at Battlemanager, for the escape process. 

 

 #--------------------------------------------------------------------------

  # * Escape Processing

  #--------------------------------------------------------------------------

  def self.process_escape

    $game_message.add(sprintf(Vocab::EscapeStart, $game_party.name))

    success = @preemptive ? true : (rand < @escape_ratio)

    Sound.play_escape

    if success

     (How to call a common event here)

    else

      @escape_ratio += 0.1

      $game_message.add('\.' + Vocab::EscapeFailure)

      $game_party.clear_actions

    end

    wait_for_message

    return success

  end

 

I found the location I need to edit, but I don't know the correct script language to make it work. In the (How to call a common event here), i need to tell the game to run a common event (in my case, it is Id = 6). I've tried $data_common_events = 6 but all it does it freeze, so im doing it wrong lol. (Don't really know much about scripting but simple editable things)
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I am writing a script for escape events but there are some issues I am running into.


I was going to add it to the post-battle events but then realized there are many different types of escapes...


It would not be a trivial task to add post-escape event processing before you return to the map scene because the battle scene does not check for events anymore, which means common events won't run.


Which means simply reserving a common event would have it run outside of battle, not in battle.
 
Last edited by a moderator:

Beniwa

Villager
Member
Joined
Dec 24, 2012
Messages
23
Reaction score
0
First Language
English
Primarily Uses
I am writing a script for escape events but there are some issues I am running into.

I was going to add it to the post-battle events but then realized there are many different types of escapes...

It would not be a trivial task to add post-escape event processing before you return to the map scene because the battle scene does not check for events anymore, which means common events won't run.
That sucks to hear that you're running into problems, I wish you luck with that amazing script!

and I would kiss you if i could XD I hadn't thought of adding 'process_post_defeat_event' into that line. It works beautifully now for what I need. Thank you so much ^^!!!!!

Problem resolved.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
That's for defeat though. Are you sure that's what you want? (cause the same event would run when you lose the battle)
 
Last edited by a moderator:

Beniwa

Villager
Member
Joined
Dec 24, 2012
Messages
23
Reaction score
0
First Language
English
Primarily Uses
Yes. I am considering 'escape' as 'defeat' they both serve the same purpose for this style of combat. Basically, 'not winning'. Since there is no game over in my game, whether you lose or escape, you will return to back to the map and lose a bit of currency. What I needed to accomplish is that Actor 1, returns to the party after the fight is 'over' but before it returns me back to the overworld. He/She is removed at the beginning of the fight, because I want the minion actors to do the fighting, not the human actor. (Sort of like Pokemon if you will. [Although pokemon sends you back to the pokemon center >__> but that's a different point XD]) 
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
As long as it's doing what you want it to do, I'll mark this as resolved. If, with further testing, you realize it's NOT working as you need it to, just report the post and we'll reopen.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top