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
842
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,867
Reaction score
14,521
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

I've decided "Attack on Equestria" should be released first... hence this new ARG channel! https://www.youtube.com/channel/UClKiUI8xOVx9dsF4kRXUmxw
Check it out, and subscribe! The ARG will lead up to the video game. It's not a creepy game, but I just thought it should follow ARG standards.
For anyone interested in my project M - i finally made a gamethread about it :D

Yay. I turned 39 today. Another year older, another year closer to the grave.
I'm sure the latest post/thread in the sidebar used to have 5 posts. Was it always been like this?

Made it to the 10th video doing this! :kaocry:

renderTimingPixel.png

Forum statistics

Threads
110,407
Messages
1,053,064
Members
143,469
Latest member
ClementPanchout
Top