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

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

  1. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,379
    Likes Received:
    3,654
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Yes. The form is:
    Code:
    if (condition) {
        thing to do if condition is true
    }
    The condition will accept battlers in the form of objects and it's pretty good about tracking who is who. So I think you can type something like:
    Code:
    if (user === target) {
    ...
    or even:
    Code:
    var member = $gameTroop.members()[i];
    if (user === member) {
    ...
    (assuming that i is a number representing the index of an enemy in a troop)

    I'm not 100% sure about the term "target"; I believe that's how you refer to the target being affected but it's whatever you use to do things to the target in the rest of the action sequence. It's been several months since I've worked with Action Sequences.
     
    Last edited: Sep 20, 2019
  2. Aesica

    Aesica undefined Veteran

    Messages:
    784
    Likes Received:
    744
    Location:
    SW5GMW 4xVHk
    First Language:
    English
    Primarily Uses:
    RMMV

    Action sequence conditional syntax is a bit different than true javacript, thus:

    Code:
    if user === target
      action
      action
    else if $gameVariables.value(1) > 5
      action
      action
    else if target.name().toLowerCase() === "harold"
      action
      action
    else
      action
      action
    end
    Everything after the "if" is eval'd javascript, but otherwise, you're working with the action sequence mini-language, so no curly braces and such. In most cases, anyway.

    I'm pretty sure that won't work because you'd need to iterate through "member" since $gameTroop.members() returns an array. It also returns all members of the troop, dead or alive, so $gameTroop.aliveMembers() or $gameTroop.deadMembers() is preferred. Since the action sequence engine automatically iterates through every target of the effect, the "target" identifier will always reference the current target of an effect. So when Harold uses Spark on a troop consisting of Slime, Red Slime, and Metal Slime, "target" will reference the Slime when it hits the Slime, followed by the Red Slime when hitting the Red Slime, then finally the Metal Slime. So, to have it do something a bit different vs the Metal Slime, you'd do something like:
    Code:
    <whole action>
    if target.name() === "Metal Slime"
      special action sequences vs metal slime
    else
      normal action sequences
    </whole action>
    You can do this:
    Code:
    if target === user
      actions to do if the user is also the target
    end
    if user.friendsUnit() === target.friendsUnit()
      actions to do if the target is an ally
    end
    if user.friendsUnit() === target.opponentsUnit()
      actions to do if the target is an enemy
    end
    Now there's probably a cleaner way to do it, but that's what comes to mind off the top of my head.
     
  3. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,379
    Likes Received:
    3,654
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'm not 100% sure but I believe that Yanfly's Action Sequences will accept either way.

    Thanks for the catch. I actually typed it correctly, but the forum removed the "[" plus "i" plus "]" because it thought I wanted to create an Italics tag. That's why the rest of my post's body was in Italics. Fixed it by putting the whole example inside a code block.
     
    Aesica likes this.
  4. Aesica

    Aesica undefined Veteran

    Messages:
    784
    Likes Received:
    744
    Location:
    SW5GMW 4xVHk
    First Language:
    English
    Primarily Uses:
    RMMV
    Doh, I can't believe I didn't catch the format change. Yeah, sometimes bbcode can be...not helpful. :D
     
    Wavelength likes this.
  5. Toxsick

    Toxsick Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    hey guys im new to all this and tried out some of the Action sequences you guys put up and the actions are going but my guys won't move any thoughts?
     
  6. Yougotsomechocolate

    Yougotsomechocolate Random Chest Veteran

    Messages:
    194
    Likes Received:
    79
    First Language:
    English
    Primarily Uses:
    RMMV
    Do you have yanfly battle core and action sequence 1-3 installed and on? Also are they in the correct order
    Order:
    BattleCore
    ActSeq1-3
     
    Last edited: Sep 23, 2019
  7. Toxsick

    Toxsick Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Ya I finally figured it out for some reason I had to hit initialize on the battle tester for it to show. lol Thanks for the help tho!
     
  8. BlitzMalachite

    BlitzMalachite The Masterminded Veteran

    Messages:
    120
    Likes Received:
    70
    Location:
    Saudi Arabia
    First Language:
    English
    Primarily Uses:
    RMMV
    Hmm. I'll see if it works!
     
  9. Yougotsomechocolate

    Yougotsomechocolate Random Chest Veteran

    Messages:
    194
    Likes Received:
    79
    First Language:
    English
    Primarily Uses:
    RMMV
    can anybody suggest sequences for a monk type class here?
     
  10. jonenglish91

    jonenglish91 Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    English


    Here is a charge type skill that I thought you guys might be interested in!

    In the video it's called vira's will

    <target action>

    se: TO7BTL_1096

    ACTION CUTIN USER: template horizontal

    Wait: 100

    opacity all actors: 0%, 20

    opacity enemies: 0%, 20

    opacity user: 100%, 20

    common event: 2

    -----<movement>------

    se: crossbow

    motion evade: user

    move user: forward, 150, 12

    jump user: 30, 12

    wait for movement

    motion idle: user

    wait: 10

    -----<movement>------

    battleback 3 add: battlebacks1, SpeedlineverticalBW

    battleback 3 scroll speed y: -300

    camera screen: user, base top, 15

    zoom: 200%, 15

    wait: 30

    zoom: 100%, 120

    se: TO7BTL_1101

    ------Charge Skill-------

    animation 201: user

    animation 204: user

    shake screen: 3, 5, 60

    custom motion charge: user

    action effect: user

    wait for animation

    wait for camera

    battleback 3 remove

    common event: 3

    opacity all actors: 100%, 20

    opacity enemies: 100%, 20

    reset camera

    reset zoom

    --------Charge Skill------

    </target action>
     

Share This Page