mkelly527

Villager
Member
Joined
May 17, 2021
Messages
22
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hey guys, I was wondering if it is possible to spawn an enemy repeatedly. I'm trying to make a wave/round based system a certain amount of enemies are progressively spawned more and more as the player advances in the game. Any help would be appreciated!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,812
Reaction score
8,226
First Language
German
Primarily Uses
RMMV
depends on where you want to spawn the waves. theoretically it is possible everywhere, but in some cases you'll need scripts or plugins depending on your maker.

if you want the enemies to spawn on the map and have different battles on reaching the player, that can be done by default.
if you want the spawn happen on the battlescreen, then the original engine is limited to a total of eight enemies (original and summoned together). To add more enemies you'll need either a script (XP, VX and VXA) or a plugin (MV and MZ) for enemy summons or troop control.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,041
Reaction score
5,705
First Language
English
Primarily Uses
RMVXA
I've moved this thread to RPG Maker MV Support. This is based on your "Primary" engine according to your profile; if you were asking about a different RPG Maker, report this post and let us know which one and we'll move it to the right place. (Note that Game Mechanics Design is only for conceptual game design discussion - for example, how to balance the number of waves against player strength, or how to design sets of waves to build to a crescendo where the last one is the most exciting.)

This is definitely possible in RPG Maker MV, though it takes some work. The way I would do it is to install the Custom Page Conditions and End Phase Triggers plugins from HimeWorks, read up on how these excellent plugins work, and then create Troop Pages in each troop that "refill" the troop's members once they are all dead.

Therefore, you'll need a custom page condition that indicates all the enemies are dead. The best way to do this is a JavaScript line (using Custom Page Conditions) that directly checks for it - something like $gameTroop.aliveMembers().length === 0 but if that doesn't work you'll need to play around with the syntax.

And you'll also need the "refill the troop" behavior - the best way I've found to do this is to Transform each enemy into whatever is in their position on the next wave (this is a normal Event command), do a Recover All on them (also a normal Event command), and then play a quick animation over them to assure there are no graphical bugs where they don't display to the player.

Finally, you'll need a way to ensure the battle ends after eliminating the required number of waves, rather than continue forever! Each time you refill the troop, be sure to increase a variable by 1 (and also be sure to reset it to 0 at the beginning of each fight!). Then, to make sure that the waves don't refill after completing the required number, you'd add some extra custom page condition into the refill page, such as $gameVariables.value(15) < 4 if you're using Variable #15 to track the number of respawns want there to be 5 waves in the battle (5 waves because 4 respawns plus the original wave of enemies).
 

Latest Threads

Latest Posts

Latest Profile Posts

So yesterday Dad took me to Volcano Bay, and it was almost ruined by a thunderstorm... then it passed by and the lightning warning got lifted, leading to an awesome time sliding and swimming. Hopefully we get to go to the arcade tonight. The one we're planning on has a restaurant built in with AWESOME food. Not to mention how big the arcade itself is!
image_2021-06-13_150033.png

Maybe I'll actually try making a retro pack. Already have the shark fin made so why not xD
Hey everyone, for everybody following along with my RPG Maker MZ streams: There will unfortunately not be a stream tonight. There is a big exciting event that will go live next week that has been taking all my time, so look forward to that!
Took a small break by playing VR. Latest update of these glasses unfortunately caused a little of trouble but it can be fixed with a manual operation.

Until You Fall is freaking awesome.
I am SO HYPED to share this trailer with everyone when its done. I almost want to tear up i had no idea how far i came along with Fallen Feather in these last 3 years.

Forum statistics

Threads
112,192
Messages
1,066,493
Members
145,802
Latest member
MrShiranai
Top