RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Request] Guard => Skill

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 84
"Rawr"
I know a little bit of scripting by now, but i just can't seem to find how to do this.

Well i use Tankentai, and ive been tryin to follow the script up to how it selects and executes a skill but it goes through so many modules that i get lost lol

Basically i just want a code that i can put on my " def execute_action_guard " that starts the action of using the skill id of X. It doesn't even need to go to the targetting, it will be a self target skill, but it can have, it'll just point to the self guy anyway.

I believe assigning the guard command of that specific character to a skill is the way to go.

I could also, maybe, modify his guard to play an animation on him, and add a state (which is what my skill will do). But i think finding out how to make a command that gets the actor to execute a certain skill will help me in future things as well.


Please, help?

EDIT: This is my execute_action_guard. it has a comment of interest.

Code: [Select]
  #--------------------------------------------------------------------------
  # execute action guard
  #--------------------------------------------------------------------------
  alias execute_action_guard_sss_dhmg execute_action_guard unless $@
  def execute_action_guard
 
  case @active_battler.class_id
  when 1
  hp_gain = 10
  mp_gain = 100
  format = "%s: healed and reloaded"
  text = sprintf(format, @active_battler.name)

  when 2.3

  # FIND A WAY FOR THIS TO PLAY A SKILL
  # OR AT LEAST TO PLAY ANIMATION AND ADD A STATE
 
  hp_gain = 0
  mp_gain = 30
  format = "%s: charged Psionic power"
  text = sprintf(format, @active_battler.name)
 
  when 4..5
  hp_gain = 20
  mp_gain = 0
  format = "%s: defending incoming attacks"
  text = sprintf(format, @active_battler.name)
 
  end

hp_healed = @active_battler.maxhp * hp_gain / 100
mp_healed = @active_battler.maxmp * mp_gain / 100
@active_battler.hp += hp_healed
@active_battler.mp += mp_healed
execute_action_guard_sss_dhmg

@help_window.set_text(text, 1)
@help_window.visible = true
RPG::SE.new("Reload", 100, 100).play
wait(45)
@help_window.visible = false

  end
#====================== A Dust Tale