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>
Getting Skill Type ID
● ARCHIVED · READ-ONLY
-
-
$dataSkills[skill_Id].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?In a Game_Action context:
Code:this.item().stypeId -
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:Sorry for the late reply but could you give me a quick example on how to use that line?
Code: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. :kaojoy:<Custom Confirm Effect> if (target.result().isHit()) { if (this.isPhysical()) { if (this.item().stypeId !== 1) { target.startAnimation(61); } } } </Custom Confirm Effect>
As an aside, you can write things more compactly here if you want by using the logical "and" operator:
Code:It's mostly a style thing, the two should be functionally equivalent~<Custom Confirm Effect> if (target.result().isHit() && this.isPhysical() && this.item().stypeId !== 1) { target.startAnimation(61); } </Custom Confirm Effect> -
Thank you! It works perfectly.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: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. :kaojoy:<Custom Confirm Effect> if (target.result().isHit()) { if (this.isPhysical()) { if (this.item().stypeId !== 1) { target.startAnimation(61); } } } </Custom Confirm Effect>
As an aside, you can write things more compactly here if you want by using the logical "and" operator:
Code:It's mostly a style thing, the two should be functionally equivalent~<Custom Confirm Effect> if (target.result().isHit() && this.isPhysical() && this.item().stypeId !== 1) { target.startAnimation(61); } </Custom Confirm Effect>