How does currentAction work?

Discussion in 'Learning Javascript' started by Ghost of Christmas Kloe, Mar 28, 2016.

Thread Status:
Not open for further replies.
  1. Ghost of Christmas Kloe

    Ghost of Christmas Kloe Ghost of a Princess Seagull Veteran

    Messages:
    1,504
    Likes Received:
    913
    Location:
    Somewhere...
    First Language:
    English
    Primarily Uses:
    N/A
    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: Mar 28, 2016
    #1
  2. chaucer

    chaucer Veteran Veteran

    Messages:
    236
    Likes Received:
    355
    Location:
    Lost at sea
    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.
     
    #2
    Kino and Ghost of Christmas Kloe like this.
  3. Ghost of Christmas Kloe

    Ghost of Christmas Kloe Ghost of a Princess Seagull Veteran

    Messages:
    1,504
    Likes Received:
    913
    Location:
    Somewhere...
    First Language:
    English
    Primarily Uses:
    N/A
    Thank you!!! That is exactly what I needed!


    Hmm... It's actually pretty interesting too, I didn't know about _item._itemId
     
    #3
    Kino likes this.
  4. chaucer

    chaucer Veteran Veteran

    Messages:
    236
    Likes Received:
    355
    Location:
    Lost at sea
    First Language:
    English
    Primarily Uses:
    RMMV
    Npnp glad I could help n.n
     
    #4
Thread Status:
Not open for further replies.

Share This Page