This sounds to be noob or crazy but in script call or scripting, how can I perform a skill again?
Say I have a command in my BattleCommand named "Forced Magic" and when I select that, it randomly casts any skill from the database.
What's the script for calling / casting a skill again?
so after Forced Magic is used, you want to use Forced Magic Again???
Nope. I want to use it once only in a battle. How can I cast a skill? or the specific script call to cast this skill?
I can't quite understand what you want... you asked how to perform a skill again, then you tell me that it should only be used once?
or do you want the Forced Magic skill to cast another skill at random? there's a script for that out there... Skill Invoke if I remember correctly
Being able to activate it randomly was just my example 🙂
My specific request is on how to exactly activate a skill in battle. I am using a script called SEA - Battle Common Events, however, I want to tweak it a bit so that I can cast a skill inside the script instead of using one on common events. This is specifically to control what skill is specific for that actor.
There's some methods to do this.
What I often use is inserting a new action for the battler and call use_item/execute_action directly. Something like this:
class Scene_Battle < Scene_Basedef force_skill(actor, skill) #store current subject last_subject = @subject @subject = actor #creating new action action = Game_Action.new(actor) action.set_item(skill) if actor.usable?(action.item) # insert the action to the front of the battler's actions, execute, # then remove the action from the battler's actions. actor.actions.unshift(action) use_item actor.actions.shift end #restore current subject @subject = last_subjectendendYou can look to use_item method in Scene_Battle, or the methods that calls it, to learn how skills/items are executed.
Ahhh, this helps. Does this mean that if I want an actor to perform a skill I have to do them individually? Such as one method per skill?
I see. I am currently searching on the default script and looking how they do perform however there's not one I can think of to where they actually go. I'll try to base your snippet on it, might as well see how it turns out. I've been having problems on this lately, can't figure it out.