using $scene during battles
#1
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! Blushing + Cheery
Reply }
#2
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.
Reply }
#3
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...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#4
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
Reply }
#5
(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.
Reply }
#6
(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?
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
Sad  Equip bug (1-scene CMS) Whisper 2 5,506 01-23-2017, 09:20 AM
Last Post: Whisper
   A fourth column in MOG Scene Item Laura V1.2 Noctis 13 20,393 11-27-2016, 05:12 PM
Last Post: DerVVulfman
Bug Help with a Scene Equip Iqus 7 8,312 03-05-2014, 05:40 PM
Last Post: MechanicalPen
   Using animations in a scene (unrelated to battles and maps) PK8 4 9,036 11-17-2009, 10:54 AM
Last Post: PK8
   Timing problem with damage shown on the screen - Scene Battle mageone 2 6,304 10-20-2009, 06:22 PM
Last Post: mageone
   [Resolved] Equipment Scene Problem Yin 4 7,290 08-29-2009, 11:01 PM
Last Post: Yin



Users browsing this thread: 1 Guest(s)