Yanfly's Event Spawner, how to call multiple times?

Status
Not open for further replies.

chrisxiao

Sin
Member
Joined
Oct 27, 2014
Messages
11
Reaction score
7
First Language
English
Primarily Uses
RMMV
I'm currently copy pasting the same script call in order to have multiple events on a map, is there a way to write it down in a single line?

here is the script call:
Yanfly.SpawnEventInRegion(1, 3, 1, false)

I want something like:
[n]Yanfly.SpawnEventInRegion(1, 3, 1, false)
n - is how many times the script is called

Script by Yanfly: http://yanfly.moe/2018/09/14/yep-170-event-spawner-rpg-maker-mv/
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,718
First Language
English
Primarily Uses
RMVXA
@chrisxiao Please edit your post to include a link to the web page where you got the plugin so that people don't have to hunt for it if they need to check something before replying.
Thanks
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,831
Reaction score
14,021
First Language
English
Primarily Uses
RMMV
Code:
for (var i = 0; i < 50; i++) { Yanfly.SpawnEventInRegion(1, 3, 1, false); }

Replace 50 with the number of events you want.
 

chrisxiao

Sin
Member
Joined
Oct 27, 2014
Messages
11
Reaction score
7
First Language
English
Primarily Uses
RMMV
Code:
for (var i = 0; i < 50; i++) { Yanfly.SpawnEventInRegion(1, 3, 1, false); }

Replace 50 with the number of events you want.
Thank you very much, it works <3
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,033
Reaction score
5,334
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

I'm moving on from RMXP finally. I've been stuck in a difficult decision between XP and MZ, and I've given up and moved on to MZ. Overall I'm really liking it, I wish tilesets were easier to setup like XP, but it's actually not that bad!
Have you ever gone full 'Ship of Theseus' while frankenspriting? Because I just did.
I saw my new eye doctor today, he reminds me of Satoru Iwata for some reason
I've been using a modified version of a script called Multiple Messages. It makes my text boxes look like a Mario & Luigi game! There is something about it that bothers me a little bit, but I shouldn't worry about that now.

Side note, Mist's walking animation is almost perfectly in sync with Loose Yourself by Eminem.
Starting work on some stuff for the community. Hopefully it will be fun, and useful to somebody.

Forum statistics

Threads
107,773
Messages
1,032,040
Members
139,915
Latest member
nick7626
Top