Checking for specific skill currently being used (Solved)

Thornton

Warper
Member
Joined
Jul 17, 2015
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hi all, I'm wondering what's the code for checking what current skill the actor is currently using? I checked 'ol Father Google, but errors get tossed my way when using those codes in related topics.

I'm utilizing Yanfly's Buff & State Core for the code.
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
697
Reaction score
216
First Language
Vietnamese
Primarily Uses
RMMV
I use the following piece of codes to check if specific skills are currently used by the actor.
- For Action Start and Action End Effects:
Code:
var action = user.currentAction();
var skills = [];
skills.push(a,b,c,d); //Change a b c d to your skill IDs
if (action && action.isSkill() && skills.contains(action.item().id)){
//Do something here
}
- For Initiate/Select, Confirm/React, Respond/Establish and Deselect/Conclude Effects
Code:
var skills = [];
skills.push(a,b,c,d); //Change a b c d to your skill IDs
if (this.isSkill() && skills.contains(this.item().id)){
//Do something here
}
 

Thornton

Warper
Member
Joined
Jul 17, 2015
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
I use the following piece of codes to check if specific skills are currently used by the actor.
- For Action Start and Action End Effects:
Code:
var action = user.currentAction();
var skills = [];
skills.push(a,b,c,d); //Change a b c d to your skill IDs
if (action && action.isSkill() && skills.contains(action.item().id)){
//Do something here
}
- For Initiate/Select, Confirm/React, Respond/Establish and Deselect/Conclude Effects
Code:
var skills = [];
skills.push(a,b,c,d); //Change a b c d to your skill IDs
if (this.isSkill() && skills.contains(this.item().id)){
//Do something here
}
Works perfectly, thanks a lot!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top