Posts: 18
Threads: 6
Joined: May 2017
Hello, i have 2 questions:
1 - is it possible to interrupt an enemy before he starts an action and then call a common event? For exemple, right before an enemy starts an attack I call a common event using 'force action' to make actor 1 use a skill or attack. After that the enemy would attack normally and the battle would continue
2 - I have a script that you need to call it like this for it to work
$scene = Chain_Commands.new(ID)
But when I try using this command during battle, it aborts the battle suddenly and only then the $scene is called (and the battle music continues playing). Is there a way to make it work during a battle?
The script that I'm trying to use is MOG - Chain Commands v1.0
Thanks!
Posts: 71
Threads: 10
Joined: Jun 2015
I believe that script is used in events not in the battle system.
If you change the value of global variable $scene it automatically exits the old scene and begins an instance of the new one.
Posts: 11,230
Threads: 649
Joined: May 2009
Right script for the right outcome. To be honest, I interrupted an action performed by an actor just by having it programmed in the TROOPS database. It wasn't sophisticated.... Just after turn 4, I forced Gloria (one of the defaults) to cast a healing spell on herself.
As to using Moggy's chain script, if you like having something in battle where the player needs to press key combos (ala Tifa lockheart), I recommend Claihm's Tactical Skills for free games or Zephren's Timed Hits if you wanna go commercial. Claihm's terms of use are 'no commercial gain'
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 18
Threads: 6
Joined: May 2017
Yes, for now the best solution that I came up with was using variables and giving the player a 30% chance per turn to use a skill that either grants 100% evasion or stun the enemy.
But is there some way to discover when the enemy is going to attack or use a skill and then interrupt him? Like, the message box written "Fireball" appears with the user animation, but before the enemy uses the skill fireball a text box would appear with something like "player: I found an oppening!" and then the player would need to do a chain command and if he managed to get it right the enemy wouldn't use fireball anymore and instead the player would attack.
Sorry if it's too confusing xD
I tested Zephren's Timed Hits that you suggested and it's a good script, but is there a way to make the skill fail if the player don't press the keys at the right time? Or activate switches/variables when you complete all the sequence like Mog's Chain Commands? All that I saw was to increase the damage of the skill for each time you pressed right, which is very interesting, but not exactly what I'm searching
Posts: 71
Threads: 10
Joined: Jun 2015
(01-17-2018, 03:12 PM)Keeroh Wrote: Yes, for now the best solution that I came up with was using variables and giving the player a 30% chance per turn to use a skill that either grants 100% evasion or stun the enemy.
But is there some way to discover when the enemy is going to attack or use a skill and then interrupt him? Like, the message box written "Fireball" appears with the user animation, but before the enemy uses the skill fireball a text box would appear with something like "player: I found an oppening!" and then the player would need to do a chain command and if he managed to get it right the enemy wouldn't use fireball anymore and instead the player would attack.
Sorry if it's too confusing xD
I tested Zephren's Timed Hits that you suggested and it's a good script, but is there a way to make the skill fail if the player don't press the keys at the right time? Or activate switches/variables when you complete all the sequence like Mog's Chain Commands? All that I saw was to increase the damage of the skill for each time you pressed right, which is very interesting, but not exactly what I'm searching
This is probably not the best method to per se "interupt" an attack but I use it to block attacks based on eva rating and whether actor has a shield.
In Scene_Battle 4 find...
Code:
def make_basic_action_result
# Interupt if Current attacker is_a Enemy Object
process_interupt if @active_battler.is_a?(Game_Enemy)
# If attack
if @active_battler.current_action.basic == 0
if you create a method such as
Code:
def process_interupt
# Put something here to have happen such as skip to next step
# Example - Skip to next step
@phase4_step = 1
return
end
You can even add a timer loop with a little code. I have however, never successfully been able to add a quick time event where input(s) are entered. A bit beyond my abilities I imagine.
Keep in mind, the example above will basically skip ALL enemy turns.
Posts: 18
Threads: 6
Joined: May 2017
(01-17-2018, 03:40 PM)BeJeremiah Wrote: (01-17-2018, 03:12 PM)Keeroh Wrote: Yes, for now the best solution that I came up with was using variables and giving the player a 30% chance per turn to use a skill that either grants 100% evasion or stun the enemy.
But is there some way to discover when the enemy is going to attack or use a skill and then interrupt him? Like, the message box written "Fireball" appears with the user animation, but before the enemy uses the skill fireball a text box would appear with something like "player: I found an oppening!" and then the player would need to do a chain command and if he managed to get it right the enemy wouldn't use fireball anymore and instead the player would attack.
Sorry if it's too confusing xD
I tested Zephren's Timed Hits that you suggested and it's a good script, but is there a way to make the skill fail if the player don't press the keys at the right time? Or activate switches/variables when you complete all the sequence like Mog's Chain Commands? All that I saw was to increase the damage of the skill for each time you pressed right, which is very interesting, but not exactly what I'm searching
This is probably not the best method to per se "interupt" an attack but I use it to block attacks based on eva rating and whether actor has a shield.
In Scene_Battle 4 find...
Code:
def make_basic_action_result
# Interupt if Current attacker is_a Enemy Object
process_interupt if @active_battler.is_a?(Game_Enemy)
# If attack
if @active_battler.current_action.basic == 0
if you create a method such as
Code:
def process_interupt
# Put something here to have happen such as skip to next step
# Example - Skip to next step
@phase4_step = 1
return
end
You can even add a timer loop with a little code. I have however, never successfully been able to add a quick time event where input(s) are entered. A bit beyond my abilities I imagine. Keep in mind, the example above will basically skip ALL enemy turns.
Sorry, it looks like my coding capabilities with ruby are still far below average xD
I kind of understood about creating a method and calling it in the
def make_basic_action_result but where should I inform to check things like if actor is equiped with x armor/weapon or if it's percentage based?