Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Run/Flee in Battle Command Window

I'm using a script that gets rid of the window that says "Fight/Run" that appears in the beginning of the Player Turn because I'm using a Real-Time Active Battle System to fight.  Can someone please make a script that puts a "Run/Flee" command into the list of battle commands (Attack/Skill/Item) so that players are able to flee a battle?
 
Code:
this one's fairly easy, first, go to the Scene_Battle 1 script and change
# Make actor command window
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
    @actor_command_window.y = 160
To:
Code:
# Make actor command window
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    s5 = "Flee"
    @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4,s5])
    @actor_command_window.y = 128
Then go to Scene_Battle 3 and under this:
Code:
 when 3  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Set action
        @active_battler.current_action.kind = 2
        # Start item selection
        start_item_select
(starts line 145)
add this:
Code:
when 4 # flee
        $game_system.se_play($data_system.decision_se)
        #start escape phase
        update_phase2_escape
That'll do it
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top