For those who aren't familiar with the Tales Of Series, basically depending on which position you touch an enemy, you either get preemptive bonuses, or surprise attack debuffs. If you touch the enemy from behind, you get the advantage, on the other hand if the enemy touches your back they get the upper hand. (Might as well change the battle disadvantage to touching the enemy while being in front of it, to make it easier)
I was wondering if someone could give me an idea, or help me, do something more a less like this. I'm already aware of several battle advantage scripts, such as Yanfly's. Just wanted to know if there was some way to recreate this one.
I want to know if there is some way to determine from which direction you touch an event, based on the direction it is currently facing.
Thank you~ :D
Tales Of~ Battle Advantage
● ARCHIVED · READ-ONLY
-
-
bump~
-
Re bump~
-
And another bump~
-
well if I understand you want something like a special encounter ....?
-
If your enemies are in the map and triggers a Battle Processing event, then there's an easy way to do this.
-
Yes they are in map and trigger the battles, I never really liked random encounters...If your enemies are in the map and triggers a Battle Processing event, then there's an easy way to do this.
And... REALLY? :D ! -
bump~
-
I have a solution for you :) This script allows you to change prep to true to activate a preemptive encounter and surp to true if a surprise encounter. All you have to do is event when you want this to happen. (note: only works with touch encounters). Hope this helps. :)
Code:#change via a script call : BattleManager.prep or surp = true or false#give credit to AwesomeCoolmodule BattleManager class << self attr_accessor :prep attr_accessor :surp end #-------------------------------------------------------------------------- # * Initialize Member Variables #-------------------------------------------------------------------------- def self.init_members @phase = :init # Battle Progress Phase @can_escape = false # Can Escape Flag @can_lose = false # Can Lose Flag @event_proc = nil # Event Callback#~ @preemptive = false # Preemptive Attack Flag#~ @surprise = false # Surprise Flag @preemptive = ( rate_preemptive) @surprise = ( rate_surprise && !preemptive ) @prep = false @surp = false @actor_index = -1 # Actor for Which Command Is Being Entered @action_forced = nil # Force Action @map_bgm = nil # For Memorizing Pre-Battle BGM @map_bgs = nil # For Memorizing Pre-Battle BGS @action_battlers = [] # Action Order List end def self.rate_preemptive if @prep == true @preemptive = true else @preemptive = false end end def self.rate_surprise if @surp == true && @prep == !true @surprise = true else @surprise = false end endend -
Thank you! <3I have a solution for you :) This script allows you to change prep to true to activate a preemptive encounter and surp to true if a surprise encounter. All you have to do is event when you want this to happen. (note: only works with touch encounters). Hope this helps. :)
#change via a script call : BattleManager.prep or surp = true or false#give credit to AwesomeCoolmodule BattleManager class << self attr_accessor :prep attr_accessor :surp end #-------------------------------------------------------------------------- # * Initialize Member Variables #-------------------------------------------------------------------------- def self.init_members @phase = :init # Battle Progress Phase @can_escape = false # Can Escape Flag @can_lose = false # Can Lose Flag @event_proc = nil # Event Callback#~ @preemptive = false # Preemptive Attack Flag#~ @surprise = false # Surprise Flag @preemptive = ( rate_preemptive) @surprise = ( rate_surprise && !preemptive ) @prep = false @surp = false @actor_index = -1 # Actor for Which Command Is Being Entered @action_forced = nil # Force Action @map_bgm = nil # For Memorizing Pre-Battle BGM @map_bgs = nil # For Memorizing Pre-Battle BGS @action_battlers = [] # Action Order List end def self.rate_preemptive if @prep == true @preemptive = true else @preemptive = false end end def self.rate_surprise if @surp == true && @prep == !true @surprise = true else @surprise = false end endend
However my problem is exactly that... I have no clue on how to event this. On making it a preemptive attack if you touch another event from behind, and making it a surprise attack if an enemy touches the character's back.
What I want to know is how to determine THAT, a way to know from which direction from the event's perspective, the player touched it. (If an enemy on map event is looking down, and you approach from above and touch "his back" before he turns to your direction preemptive happens.)
And the reason I believe this is possible is that whenever you place an NPC that doesn't move, and talk to it on any direction, it actually turns to the direction you are talking him from, instead of not turning at all. So it DOES know which direction you triggered the event from. -
Are you looking for something like this?
http://yanflychannel.wordpress.com/rmvxa/field-scripts/active-battle-advantage/
Script repository link:
https://github.com/Archeia/YEARepo/blob/master/Field/Active_Battle_Advantage.rb -
I already knew of that script, my goal here is to replicate what I wrote on the first post~Are you looking for something like this?
http://yanflychannel.wordpress.com/rmvxa/field-scripts/active-battle-advantage/
Script repository link:
https://github.com/Archeia/YEARepo/blob/master/Field/Active_Battle_Advantage.rb -
Yes. If they trigger the battle, the first thing you need to do is to determine whether the player is facing right, left, up, or down in Player Touch (on the enemy event). Since you need to determine all of this, you'll probably need the move route of your enemies chasing you.