How does currentAction work?

Status
Not open for further replies.

Ghost of Christmas Kloe

The Icecream Princess
Veteran
Joined
Nov 15, 2015
Messages
1,548
Reaction score
957
First Language
English
Primarily Uses
RMMZ
Hiya!


I was editing a script and I was wondering what means what in regards to actor.currentAction() under Window_Base?


I wanted do an if statement where it basically means If current action is attack


Basically I want to know what the value of actor.currentAction() is when attacking.


If you want an example of what actor.currentAction() is used for, in YEP_ATB and YEP_Battle_Status, it is used to show which icon should be shown while the action is charging ( the little icon which represents whatever the current action is at that time )


Thank you, and please tell me if I made no sence whatsoever...
 
Last edited by a moderator:

chaucer

Veteran
Veteran
Joined
Aug 6, 2014
Messages
325
Reaction score
549
First Language
English
Primarily Uses
RMMV
I was actually just messing with this haha, the way I found to check if it's an attack is like so.

 


//basically just checking if the current action is a skill, and then check if it's ID is 1(basic attack).
if (actor.currentAction()._item._dataClass === 'skill' && actor.currentAction()._item._itemId === 1) {

}


this was the way I found to check for basic attack. :|  hope it helps.
 

Ghost of Christmas Kloe

The Icecream Princess
Veteran
Joined
Nov 15, 2015
Messages
1,548
Reaction score
957
First Language
English
Primarily Uses
RMMZ
Thank you!!! That is exactly what I needed!


Hmm... It's actually pretty interesting too, I didn't know about _item._itemId
 

chaucer

Veteran
Veteran
Joined
Aug 6, 2014
Messages
325
Reaction score
549
First Language
English
Primarily Uses
RMMV
Npnp glad I could help n.n
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top