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:
    63
    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:
    63
    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:
    63
    Likes Received:
    11
    Location:
    United States
    First Language:
    English
    Np bro
     
  6. Weremole

    Weremole Veteran Veteran

    Messages:
    110
    Likes Received:
    113
    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:
    577
    Likes Received:
    642
    First Language:
    English
    Yes you can
     
  8. Weremole

    Weremole Veteran Veteran

    Messages:
    110
    Likes Received:
    113
    First Language:
    Swedish
    Thank you!
     
  9. Random Panda

    Random Panda Villager Member

    Messages:
    29
    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.
     
  10. Azymus

    Azymus Villager Member

    Messages:
    24
    Likes Received:
    1
    First Language:
    english
    anyone can do action sequences for enounters animation in the battle before they are start to fights like pokemon? like this
     
  11. Derf_Derf

    Derf_Derf Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Here's a jump one inspired by the Mario and luigi series, it's a bit janky tho.


    <target action>

    CAST ANIMATION: 4

    camera focus: user

    zoom: 110%, 30

    wait for zoom

    move user: target, front, 20

    wait for movement

    wait: 5

    se: (INSERT HERE)

    CAST ANIMATION: 6

    float user: 80%, 30

    move user: target, center, 20

    float user: 150%, 30

    wait for float

    float user: 70%, 10

    float user: 0%, 10

    wait for movement

    wait for float

    action animation

    shake screen: 3, 9, 10

    action effect

    immortal: target, false

    reset zoom: 10

    reset camera: 10

    jump user: 50%, 10

    move user: home, 50

    </target action>



    <follow action>

    zoom: 100%, 60

    opacity not focus: 100%, 60

    wait for opacity

    </follow action>
     
  12. Koblas

    Koblas Veteran Veteran

    Messages:
    48
    Likes Received:
    1
    First Language:
    Italian
    Primarily Uses:
    RMMV
    I really don't understand why my plugin isn't working... I just copy your scripts and paste them under the skill note, but the only thing I get is a simple attack animation (and sometimes "it's not effective on bat (the enemy) etc..."
     
  13. Azymus

    Azymus Villager Member

    Messages:
    24
    Likes Received:
    1
    First Language:
    english
    Anyone, who know how to do the action sequences of the dramatic entry like this video? watch it at 2:00 to 2:05. Pretty please?
     
  14. SanZhang

    SanZhang Freelancer Member

    Messages:
    11
    Likes Received:
    13
    Location:
    Endless Land
    First Language:
    Indonesia
    Primarily Uses:
    RMMV
    Greetings, everyone,

    I haven't read the last 80 pages, so I apologize if I've posted the similar / same animation seq:

    I have been working on some katana animations and I thought I would share it here,
    this one is inspired by Himura Battosai (iaido).

    It still a simple one, but I hope you like it.. \(^ ^ )
    Some comments and suggestions would be nice as well..

    The character would put a stance with his back exposed to the enemy,
    the enemy will be lured in, closing in.. SLASH..

    <target action>
    hide battle hud

    camera focus: user, HEAD, 30
    zoom: 1.3, 30
    wait for camera

    face user: backward
    wait: 60

    move target: user, front, 30
    wait: 30

    opacity user: 25%, 20
    wait: 10

    move user: target, back base, 5
    wait for movement

    action animation
    action effect
    wait: 10

    move user: home
    wait for movement

    face user: forward
    opacity user: 100%, 30
    wait for opacity

    show battle hud
    </target action>
     
  15. AnNihilate

    AnNihilate Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    japanese
    Primarily Uses:
    RMMV
    Hello guys!

    I apologize for my poor English firstly, but if I could get some help, I would appreciate it.

    Actually, I'm now trying to work out how to identify whether actors hit the target or not with yanfly's action sequence. The problem is that whatever the basic attack or skill hit the target or is evaded, states will absolutely be added to targets if "add state x" command is included. In this case, I'm looking for a solution that I could identify the attack is hit or evaded. If it's hit, then states will be added to that target while it's not, states won't be added.

    The reason why I don't just put states in the effect list is that I designed a weapon. If it is equipped by an actor, then the actor's attack will 100% add one state randomly from the states list every time. In other words, if user has this weapon, his every single attack can add different states with 100% rate. So, it can not be achieved if I just add states to the effect list on the skills page or to the traits list.

    That's the reason why I want to distinguish hit and evasion for attack. Actually, I don't know how to write the syntax correctly because I'm not professional at JS.

    Hope I could get solutions for modifying the code because you guys are intelligent! :)
    <setup action>
    immortal: target, true
    camera focus: user
    zoom: 150%, 15
    wait for zoom
    move user: point, 740, 400, 20
    wait for movement
    face user: target
    </setup action>

    <target action>
    perform action
    motion wait: user
    reset camera
    camera pan: left, 200, 15
    wait for camera
    animation 11: target
    wait for animation
    reset zoom: 5
    wait for zoom
    reset camera: 10
    wait for camera
    action effect
    </target action>

    <follow action>
    wait for effect
    immortal: target, false
    if user. isLearnedSkill(31) && target. isDead()
    tp +5%: user
    end
    if target.result().isHit
    change variable 20 = Math.random()*10
    if $gameVariables.value(20) >= 0 && $gameVariables.value(20) < 3
    add state 1: target
    if $gameVariables.value(20) >= 3 && $gameVariables.value(20) < 6
    add state 2: target
    if $gameVariables.value(20) >= 6 && $gameVariables.value(20) < 10
    add state 3: target
    end

    </follow action>

    <finish action>
    move user: RETURN, 30
    wait for movement
    clear battle log
    </finish action>
     
  16. SanZhang

    SanZhang Freelancer Member

    Messages:
    11
    Likes Received:
    13
    Location:
    Endless Land
    First Language:
    Indonesia
    Primarily Uses:
    RMMV
    Greetings,

    @Azymus
    If I may suggest an idea, how about showing a picture (a sprite like those grass at the entry of the battle), zoomed in, etc through common event, then call it from an event on the map through conditional branch (if an x enemy appeared)?

    @AnNihilate
    I'm not a code savvy either, but if I may suggest, if it's me, I would still use traits to deliver the states on the weapon since the hit/miss rate itself seems depend on the actor's hit rate status itself (although as I was thinking of this idea, there's possibility that the weapon would produce more than 1 states on the enemy, but still it's a matter of luck on player's RNG),

    And let's say if you want the enemy would only suffer one of the possible states from an attack;
    as you are already found the script (if an attack is hit), i would probably tinker on it from the common event, conditional branch using "if script" and call it on the "attack" skill as a trait (normal attack)..or try call it from the weapon itself..

    Using Yanfly's action sequence might be one of ways to make your idea works, but I just thought that as I'm not on that lunatic level yet, I would try another way around..
    Either way, I apologize if it doesn't answer / suitable with your needs..

    Best regards
     
  17. AnNihilate

    AnNihilate Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    japanese
    Primarily Uses:
    RMMV
    Hello! Thank you for the reply!

    I understand what you mean. Yes, I can use"change enemy state" command in the common event. But unfortunately, this command is unable to select the target that the actor attacks, it can only select the enemy index, which is enemies' order. This means, if actor attacks enemy No.2, a state will be added to enemy No.1. I think it's a kind of chaos. But it's a nice trying! Thank you very much.

    Best wishes
     
  18. Pots Talos

    Pots Talos Veteran Veteran

    Messages:
    76
    Likes Received:
    46
    Location:
    Long Island
    First Language:
    English
    Primarily Uses:
    RMMV
    Does anyone know how to check an enemies troop index number in an action sequence?

    Like if I was making something like this:

    Code:
    <setup action>
    if $gameTroop.members()[1]
        common event: 7
        else
    if $gameTroop.members()[2]
        common event: 6
        else
    if $gameTroop.members()[3]
        common event: 7
        end
        display action
    </setup action>
    I want the enemy to act a certain way in battle based on which enemy index number it is.
     
  19. AnNihilate

    AnNihilate Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    japanese
    Primarily Uses:
    RMMV
    Code:
     if $gameTroop.enemyIndex() == 1
    hey maybe you can try this one. But I'm not good at JS, I apologize if it not works.
     
  20. Pots Talos

    Pots Talos Veteran Veteran

    Messages:
    76
    Likes Received:
    46
    Location:
    Long Island
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks for the quick response. Unfortunately that didn't work. :frown:
     

Share This Page