Getting Skill Type ID

Can someone tell me how to get the skill type id of a current action. Similar to how I use this line for elements: if (this.item().damage.elementId === 2) {

I'm trying to get a certain animation to not play if the user is using a certain skill type. The line below is the application:
<Custom Confirm Effect>
if (target.result().isHit()) {
if (this.isPhysical()) {
target.startAnimation(61);
}
}
</Custom Confirm Effect>
$dataSkills[skill_Id].stypeId
In a Game_Action context:
Code:
this.item().stypeId
In a Game_Action context:
Code:
this.item().stypeId
Sorry for the late reply but could you give me a quick example on how to use that line?
Sorry for the late reply but could you give me a quick example on how to use that line?
Sure! Let's say you want the animation to play for all skill types except type #1 (you can check which type is which number on the Types tab in the database). Then try this:
Code:
<Custom Confirm Effect>
if (target.result().isHit()) {
  if (this.isPhysical()) {
    if (this.item().stypeId !== 1) {
      target.startAnimation(61);
    }
  }
}
</Custom Confirm Effect>
The new if statement says "is the skill type not equal to 1?", i.e. animation #61 should now play only with physical hits from skills not of type 1. 😂

As an aside, you can write things more compactly here if you want by using the logical "and" operator:
Code:
<Custom Confirm Effect>
if (target.result().isHit() && this.isPhysical() && this.item().stypeId !== 1) {
  target.startAnimation(61);
}
</Custom Confirm Effect>
It's mostly a style thing, the two should be functionally equivalent~
Sure! Let's say you want the animation to play for all skill types except type #1 (you can check which type is which number on the Types tab in the database). Then try this:
Code:
<Custom Confirm Effect>
if (target.result().isHit()) {
  if (this.isPhysical()) {
    if (this.item().stypeId !== 1) {
      target.startAnimation(61);
    }
  }
}
</Custom Confirm Effect>
The new if statement says "is the skill type not equal to 1?", i.e. animation #61 should now play only with physical hits from skills not of type 1. 😂

As an aside, you can write things more compactly here if you want by using the logical "and" operator:
Code:
<Custom Confirm Effect>
if (target.result().isHit() && this.isPhysical() && this.item().stypeId !== 1) {
  target.startAnimation(61);
}
</Custom Confirm Effect>
It's mostly a style thing, the two should be functionally equivalent~
Thank you! It works perfectly.

Original thread: https://forums.rpgmakerweb.com/threads/getting-skill-type-id.96233/