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
693
Reaction score
214
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

Staring at all the RPG Maker versions I have and realizing that my project has been a long time coming. But, I finally feel like I have the knowledge and experience to make it into something good.
We're almost done with the jam game! :D
I get scam calls all the time so today I gave them a piece of my mind. They hung up on me. Sweet revenge.
There’s a beehive in my wall

Forum statistics

Threads
104,319
Messages
1,005,526
Members
135,841
Latest member
Rixxus
Top