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
6
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,122
Reaction score
11,489
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

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,676
Reaction score
13,298
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
6
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
7,022
Reaction score
4,762
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.

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

Latest Threads

Latest Profile Posts

My old project is now a sitcom
How to do implementation the social politcal mechanics in rpg maker? Thank you for quick spark of ideas. Fear of going to the thread lol.
MerlinCross wrote on Switz's profile.
Not sure if you'll see this but I stumbled across your "Open Locker" sprite in a topic. Could I use those?
topic in question
Going to watch an episode of The Office and eat something after this little progress!

Forum statistics

Threads
100,780
Messages
979,428
Members
132,417
Latest member
U2M
Top