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
696
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 Posts

Latest Profile Posts

Yesterday I made my first step towards eating more healthily.
I saw candy on discount and did not buy it.
"They yearn for what they fear for."
I always told my DA fans how much I hate slot machines. They're fine in games as a risk-and-reward system. But when you're spending REAL MONEY in a Vegas casino to try and hit the jackpot (which very, very few people will), it can really hurt your budget. Gambling is a bad habit, and I don't like wasting my money on a slim chance. Go to Vegas for the experience, not the jackpot.
Took the kids to a corn maze. They gave us a map and had lights at certain points in the maze. Not overwhelming... or underwhelming... just... whelming.
Okay, vacuuming fruit flies out of the air is surprisingly effective.

Forum statistics

Threads
104,394
Messages
1,006,078
Members
135,928
Latest member
mich
Top