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,712
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
40,098
Reaction score
13,704
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
7,842
Reaction score
5,225
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

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top