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,112
Reaction score
11,461
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,652
Reaction score
13,264
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,001
Reaction score
4,743
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 Posts

Latest Profile Posts

ESAMarathon on Twitch, now streaming "Eat Girl". Yep, that's the title of a game... Apparently it's a Pacman knockoff.... Which is of course the only logical conclusion one would get from a name like "Eat Girl". :kaopride: I can't believe anybody would think anything else! :kaoback:
Super stoked i just finished my first town in my project, by finished i mean i can always add more decorative aesthetics and the NPCs don't talk yet but the mapping is complete and all the important chess pieces are present!
My brain: Hey, I have an idea how to make the transition to the main story quest in The Wastes more natural!
Me: Good!
My brain: You need to remake the hotel you start out in, it's not realistic enough.
Me: Ok... This was unexpected, but I can do it.
My brain: Now make each hotel floor 5 times as large to match the main part. Oh, you also need to make a bunch of new npcs to fill in the space on these maps.
Me: Crap.
Should be able to release Haxe MV/MZ next weekend.
It look that somehow MZ tracks are messed up (for example battle4 is obviously a theme, castle2 is a ship, ship1 is a scene and so on..). Maybe they just named them after with some ambiguity.

Forum statistics

Threads
100,607
Messages
977,781
Members
132,220
Latest member
lightnvs
Top