using $scene during battles - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Games Development (https://www.save-point.org/forum-4.html) +--- Forum: Code Support (https://www.save-point.org/forum-20.html) +--- Thread: using $scene during battles (/thread-7210.html) |
using $scene during battles - Keeroh - 01-17-2018 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! RE: using $scene during battles - BeJeremiah - 01-17-2018 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. RE: using $scene during battles - DerVVulfman - 01-17-2018 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' RE: using $scene during battles - Keeroh - 01-17-2018 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 RE: using $scene during battles - BeJeremiah - 01-17-2018 (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. 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 if you create a method such as Code: def process_interupt 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. RE: using $scene during battles - Keeroh - 01-17-2018 (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. 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? |