Jump to content
Szibes

Setting variable to ID of used skill

Recommended Posts

If you know the formula then just put it in the damage formula or make a common event.

$game_variables[1] = skill id #

I tried a few variations and could not get it to work then I wrote this

class Game_Action
  def set_skill(skill_id)
    if skill_id > 2
      $game_variables[1] = skill_id
    end
    @item.object = $data_skills[skill_id]
    self
  end
end

 

Edited by roninator2
  • Like 1

Share this post


Link to post
Share on other sites

$game_variables[x] == $game_actors[@actor].skill_id.used?

Maybe it's this?

Share this post


Link to post
Share on other sites

I really should stop ignoring threads after I found an answer I've been looking for.

So, to anyone in the future that might have similar question:

I used Tsukihime's formula effects and put this into notebox.

 

<formula effect>
$game_variables[VAR_ID] = X
</formula effect>

 

I ran into some problems when trying using it with skills that use "Kernel.eval method" that uses skill ID, allows to put more than 100 characters into damage formula, but I changed it to the one that don't require skill ID, and it worked like a charm. If you want to use this, I've found about it HERE.

 

If you can't use this method, put into effects a common event that sets that variable into this skill ID. 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted