Checking for specific skill currently being used (Solved)

Thornton

Villager
Member
Joined
Jul 17, 2015
Messages
7
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
715
Reaction score
228
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

Villager
Member
Joined
Jul 17, 2015
Messages
7
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!
 

Latest Threads

Latest Posts

Latest Profile Posts

Made a Mapping Tutorial on Adding Lighting/Shadows using Tileset

Currently working on a playlist of songs that have inspired my work on revamping Battle Castle, and making sure they flow decently from one to the next. I will be posting it whenever I upload my next demo.
This is the first song in the playlist.
Artists out there, is there something RPG maker related you wish your graphics software had but doesn't? (Something like automatically transform a wall tile into a cylindrical tower). I want to give a boost to WecTools, but I'm dry of ideas right now...

Forum statistics

Threads
113,909
Messages
1,078,348
Members
148,014
Latest member
irisusmitha
Top