SergeofBIBEK

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

BlueMoon

Nebula Games Leader
Veteran
Joined
Jan 10, 2017
Messages
363
Reaction score
486
First Language
Italian
Primarily Uses
RMMZ
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
344
First Language
English
Primarily Uses
N/A
OMG yes! Excellent idea! :D
 

SergeofBIBEK

Villager
Member
Joined
May 8, 2017
Messages
6
Reaction score
43
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
171
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
43
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
43
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
401
Reaction score
55
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
2
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!
 

arekushisu

Villager
Member
Joined
May 24, 2016
Messages
15
Reaction score
1
First Language
Français
Primarily Uses
Amazing plugin !
Is there any way to break a loop ?
 

Latest Threads

Latest Posts

Latest Profile Posts

Phew, sleep all day, awake all night. I don't know what to draw tonight!

Does that count as poetry? ..Is there a super fast way to test my creations in RPG Maker? Has anyone played the new Pokémon games? I'm itching to buy it but I don't think my husband will want me to after he finds out how much I spent on Christmas!
When can we get this?
RPG Maker MZ Saturn.png
Saturn port when?
I'm new to rpgmaker mv, link me some good stuff to learn.
Finally, I have graduated from college and now I can put a lot more work into my game, after having not worked on it for the better part of a year.
post so i can change my profile picture ^^

Forum statistics

Threads
117,070
Messages
1,104,292
Members
153,048
Latest member
kingjui7
Top