Pre-made (Yanfly's) Action Sequence Sharing and Discussions

Discussion in 'Javascript/Plugin Support' started by Blue001, Oct 24, 2015.

  1. PaybacK

    PaybacK Fire Crazed Veteran

    Messages:
    62
    Likes Received:
    11
    Location:
    United States
    First Language:
    English
    My action sequence for regular attacks is similar to yours. I'm no pro at JavaScript (and I mean that, I know next to nothing about it) but from what you posted it looks like a syntax error right where your <setup action> begins.

    Mine is:
    if user.attackMotion() != 'missile'

    with a single "=". You have two of them.
    So try:
    != instead of !==
     
  2. catwizard69

    catwizard69 Villager Member

    Messages:
    7
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks, totally works!!!! yeah i copypasted it from a website, so they must have accidentally gotten it wrong. for some reason, my "if" section applies to my "else" section and vice versa. I got it to work how i wanted by simply swapping them, but i'm confused. any idea why, from one noob to another? lol
     
  3. PaybacK

    PaybacK Fire Crazed Veteran

    Messages:
    62
    Likes Received:
    11
    Location:
    United States
    First Language:
    English
    Yep, because in JavaScript, the ! before the equals means 'not'. So != means 'not equal to', and 'else' is what happens if the condition isn't fulfilled, essentially swapping things around. To fix that, just remove the exclamation mark :)
     
  4. catwizard69

    catwizard69 Villager Member

    Messages:
    7
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you once again! Cheers!
     
  5. PaybacK

    PaybacK Fire Crazed Veteran

    Messages:
    62
    Likes Received:
    11
    Location:
    United States
    First Language:
    English
    Np bro
     
  6. Weremole

    Weremole Veteran Veteran

    Messages:
    59
    Likes Received:
    91
    First Language:
    Swedish
    Hey, a quick question. I think you check if the target is an actor with "if (target.isActor()" and if it is an enemy with "if (target.isEnemy()".
    So would the syntax be the same when you check who the user is? Like. "if (user.isEnemy()".

    Asking so I can make a universal Attack skill instead of needing separate ones for Actor and Enemy.
     
  7. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    504
    Likes Received:
    532
    First Language:
    English
    Yes you can
     
  8. Weremole

    Weremole Veteran Veteran

    Messages:
    59
    Likes Received:
    91
    First Language:
    Swedish
    Thank you!
     
  9. Random Panda

    Random Panda Villager Member

    Messages:
    28
    Likes Received:
    1
    First Language:
    English
    Hi all, is there a way to pan the camera if its focused on something? Panning only seems to work for me if I haven't set a focus yet. Thanks in advance.
     

Share This Page