Action Sequence Loops 1.10

Discussion in 'JS Plugin Releases (RMMV)' started by SergeofBIBEK, May 25, 2017.

  1. SergeofBIBEK

    SergeofBIBEK Villager Member

    Messages:
    6
    Likes Received:
    32
    First Language:
    English
    Primarily Uses:
    RMMV
    Action Sequence Loops 1.10
    SergeofBIBEK

    Hey everyone! I made a plugin that I think would be useful to hardcore action sequence makers!

    **Introduction**

    This is a really simple plugin. It allows you to loop within action sequences.

    **How to Set Up**

    Place this plugin below YEP_BattleEnginCore.

    **How To Loop Within Action Sequences**

    To start a loop, use the following command:

    Code:
    WHILE condition
    The condition is whatever you would put inside a normal JS while loop.

    Then end the loop with the following command:

    Code:
    END WHILE
    Here is an example:
    Code:
         <Target Action>
         while user.mp > 100
         animation 5: target
         wait for animation
         action effect
         mp -100: user, show
         wait: 10
         end while
         </Target Action>
    
    Pretty straight forward!

    **Script**

    *You can get the latest version here:*
    [Action Sequence Loops](https://www.dropbox.com/s/s1b0r6oajmm3rwq/SergeofBIBEKActionSequenceLoops.js?dl=0)

    **Credit and Thanks**

    SergeofBIBEK (me!)

    Trihan: He made me think of this from a conversation we had.

    Yanfly: You couldn't even loop in Action Sequences without Yanfly's amazing Action Sequences plugins!!

    **License:**

    Free for any use, do whatever you want. Don't even have to credit me anywhere!
     
    Last edited: May 31, 2017
    #1
    TheTitan99, Kvothe, LittleSY and 9 others like this.
  2. chobokid

    chobokid Veteran Veteran

    Messages:
    31
    Likes Received:
    5
    First Language:
    english
    Primarily Uses:
    RMMV
    This is amazing :D
     
    #2
  3. Gamefall Team

    Gamefall Team Nebula Games Leader Veteran

    Messages:
    337
    Likes Received:
    419
    Location:
    Italy
    First Language:
    Italian
    Primarily Uses:
    RMMV
    I thought about something like this for action sequences some months ago, but have no time to make a try. Happy to see developed this useful add-on! Good Job :D
     
    #3
  4. ashikai

    ashikai Veteran Veteran

    Messages:
    456
    Likes Received:
    340
    First Language:
    English
    Primarily Uses:
    N/A
    OMG yes! Excellent idea! :D
     
    #4
  5. SergeofBIBEK

    SergeofBIBEK Villager Member

    Messages:
    6
    Likes Received:
    32
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks guys. I'm also working on 'for' loops, but they are a bit more complicated. Think I've got all the logic down though.

    I'll also be updating this to show helpful errors like in Yanfly's IF conditions.

    Be sure to check out my other plugin, Action Sequence Proxy, posted earlier.
     
    Last edited: May 26, 2017
    #5
  6. AdamSakuru

    AdamSakuru StudioDaeera Veteran

    Messages:
    314
    Likes Received:
    168
    Location:
    Calgary, Alberta.
    First Language:
    English
    Primarily Uses:
    N/A
    What would be an example of a purpose of a loop in an action sequence? I think I get it, but want to see if I'm on the same page:

    Is your example, that part of the sequence would repeat itself (i.e continually draining the user's mp until the condition is met) rather than having to copy and paste the code over and over to get the same effect?
     
    #6
  7. SergeofBIBEK

    SergeofBIBEK Villager Member

    Messages:
    6
    Likes Received:
    32
    First Language:
    English
    Primarily Uses:
    RMMV
    You could never do this by copy and pasting the code over and over again. The same effect could not be reached. Because you never know how many times you need to repeat. You just repeat until you're MP is 0. If you have 1000 mp you hit many more times than if you have 200 mp.

    Also imagine other scenarios... hit the enemy until the status effect procs. Hit the enemy until dead. Keep trying some action until some condition is met. Do an action once per enemy. Do something X times based on a variable.

    The possibilities are only limited by your imagination!
     
    #7
    AdamSakuru likes this.
  8. SergeofBIBEK

    SergeofBIBEK Villager Member

    Messages:
    6
    Likes Received:
    32
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey everyone, I've updated the plugin to allow you to nest your while loops.
     
    #8
    waynee95 likes this.
  9. EricDias

    EricDias Villager Member

    Messages:
    23
    Likes Received:
    1
    First Language:
    English
    Is there a way that i can use this loop pluggin for timed attacks? I wanted to make sorth of a clash attack while the user and target were performing the action of attacking for exemple and the player would use the timed attack mash pluggin. is this possible?
     
    #9
  10. firestalker

    firestalker Veteran Veteran

    Messages:
    326
    Likes Received:
    37
    First Language:
    English
    Primarily Uses:
    RMMV
    Can you release a list of commands that can be used for this? I would like to have the action sequence to attack one enemy at a time until all the enemies are attacked... something like a wave if possible.
     
    #10
  11. LittleSY

    LittleSY Warper Member

    Messages:
    3
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    Absolutely handy!

    In my game, most of the skills I made is designed to be multi-hit, including normal attacks - 5 or more hits dealing relatively low damage. That way, there could be more leeway for accuracy to be less of an RNG godfest. Missing doesn't necessarily mean not hitting at all, but you just hit less.

    I planned on using custom stats that increases the maximum amount of hits, and so far, I like how this could do. I confess, my coding experience is still basic, so I hit a few snags here and there ^^'

    Some testing I did:
    Code:
    <Target Action>
    eval: user._hitcnt = 0;
    eval: user._ranhits = Math.ceil(Math.random(3));
    
    while user._hitcnt < 5 + user._ranhits
    action effect
    action animation
    eval: user._hitcnt += 1;
    wait: 2
    end while
    
    </Target Action>
    
    ...Which results in characters hitting 5+ extra random hits.
    Great for characters that uses guns and SMGS!
     
    #11
    AdamSakuru likes this.

Share This Page