A script that allows for the escape option to be disabled mid-battle?

Status
Not open for further replies.

Kricketot

The
Veteran
Joined
Apr 19, 2015
Messages
52
Reaction score
1
First Language
English
Primarily Uses
RMVXA
What I'm looking for is fairly simple in concept. There is a timer in my game that is constantly ticking down. If it reaches 0, the player is either forced to fight a strong enemy, or the enemy is suppose to join the battle, if the player is in one when the timer runs out. All of this works through a combination of scripts. I am only missing one piece of the puzzle. Stopping the player from running away. I've tried messing around with escape chances, but soon got annoyed and decided to throw in the towel and finally ask for help

Is there any script that allows me to change the availability of escape option mid-battle? Not before battle, IN battle, likely through a script call on a troop event page. I looked all around and couldn't find anyone with this request. Please, if you can help me here, I'd greatly appreciate it. Thanks in advance.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,194
Reaction score
843
First Language
Hungarian
Primarily Uses
RMVXA
Try this little script:
Code:
module BattleManager

  def self.can_escape=(val)
    @can_escape = val
  end
 
end
Place it anywhere between the Materials and Main slots.

With this installed, you should be able to use this script call:
Code:
BattleManager.can_escape = true  # Enable escape option
BattleManager.can_escape = false # Disable escape option

But depending on your battle scripts (if you use any), it may need some additional tweaks to make it work.
 

Kricketot

The
Veteran
Joined
Apr 19, 2015
Messages
52
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Try this little script:
Code:
module BattleManager

  def self.can_escape=(val)
    @can_escape = val
  end

end
Place it anywhere between the Materials and Main slots.

With this installed, you should be able to use this script call:
Code:
BattleManager.can_escape = true  # Enable escape option
BattleManager.can_escape = false # Disable escape option

But depending on your battle scripts (if you use any), it may need some additional tweaks to make it work.
THANK YOU SO MUCH!!! This works PERFECTLY!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,937
Reaction score
14,556
First Language
English
Primarily Uses
RMMV

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.

Latest Threads

Latest Posts

Latest Profile Posts

Whenever I start on a new chapter, it doesn't feel like the next episodes, but more like sequels :)
It can be frustrating that so many commercial games have used up titles that might otherwise be great for a project.
Light up explosions with QABS and Community Lighting.
qcPQHt9.gif

Forum statistics

Threads
110,655
Messages
1,054,985
Members
143,779
Latest member
Epitaph78
Top