Action Sequence Loops 1.10

SergeofBIBEK

Villager
Member
Joined
May 8, 2017
Messages
6
Reaction score
36
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:

chobokid

Veteran
Veteran
Joined
Nov 22, 2015
Messages
31
Reaction score
6
First Language
english
Primarily Uses
RMMV
This is amazing :D
 

Gamefall Team

Nebula Games Leader
Veteran
Joined
Jan 10, 2017
Messages
345
Reaction score
440
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
 

ashikai

Veteran
Veteran
Joined
Jun 2, 2015
Messages
456
Reaction score
341
First Language
English
Primarily Uses
N/A
OMG yes! Excellent idea! :D
 

SergeofBIBEK

Villager
Member
Joined
May 8, 2017
Messages
6
Reaction score
36
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:

AdamSakuru

[Null_Value]
Veteran
Joined
Mar 14, 2014
Messages
314
Reaction score
170
First Language
English
Primarily Uses
N/A
<Target Action>
while user.mp > 100
animation 5: target
wait for animation
action effect
mp -100: user, show
wait: 10
end while
</Target Action>
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?
 

SergeofBIBEK

Villager
Member
Joined
May 8, 2017
Messages
6
Reaction score
36
First Language
English
Primarily Uses
RMMV
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?
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!
 

SergeofBIBEK

Villager
Member
Joined
May 8, 2017
Messages
6
Reaction score
36
First Language
English
Primarily Uses
RMMV
Hey everyone, I've updated the plugin to allow you to nest your while loops.
 

EricDias

Villager
Member
Joined
Dec 26, 2015
Messages
23
Reaction score
1
First Language
English
Primarily Uses
Hey everyone, I've updated the plugin to allow you to nest your while loops.
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?
 

firestalker

Veteran
Veteran
Joined
Nov 18, 2015
Messages
345
Reaction score
41
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.
 

LittleSY

Warper
Member
Joined
Apr 11, 2017
Messages
3
Reaction score
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!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Hi, there.
I'm Creta Park, as Software engineer and Indie game developer.

Profile : creft.me/cretapark
GitHub : github.com/creta5164
Blog : creta5164.tumblr.com


My stuff

Who shares/sells their scripts/plugins on itch.io? Can I pick your brain?
If you ever need fantasy names and you're bored, make a fictional alphabet. Switch around the letters and see what you get :p
I JUST GOT PROMOTED TO 9TH GRADE BOIS!

Forum statistics

Threads
98,168
Messages
949,908
Members
129,453
Latest member
tanzx
Top