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,832
Reaction score
8,231
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,042
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 Profile Posts

Draw something
Me: No problemo! ''draws something''
Now draw the same thing from a different angle
Me: So....You have discovered my weakness...
I got a new PC... Nothing wrong with my lil laptop at all! Still works great, and I'll be using it for school. But, the specs for gaming were falling off fast. So I was selfish and bought myself a beast of a PC ^-^
Newstuff.PNG

Held hostage in my own house half the day by an old man that cant take hints or read body language, STILL manage to make some pixels! booyah! I should get a promotion!....No wait...I should get a job o_O
Potions are to be hoarded, not used... >_>

Forum statistics

Threads
112,238
Messages
1,066,766
Members
145,844
Latest member
SirSilver52
Top