Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: TKnebel on March 20, 2012, 06:30:16 PM

Title: Wave Spawning
Post by: TKnebel on March 20, 2012, 06:30:16 PM
I'm new to playmaker and I'm trying to implement a wave spawning system.
I have poolmanager 2 as well.

I have a spawn pool setup with 50 enemies I would like to spawn. (all the same prefab)

I have a spawn button that I press, and it spawns one of the enemies using the poolmanager 2 custom action kit's "PmtSpawn" action, and then hides the button until the enemy is dead.

This works fine and exactly how I'd like it to, however, I would like to spawn the entire wave of 50 enemies with a set interval between each (say half a second). What is the most efficient way of doing this?
Title: Re: Wave Spawning
Post by: Alex Chouls on March 20, 2012, 08:39:37 PM
Check out PlayMakerSamples/TestLab/Spawning for some ideas.

NOTE: Import the samples into a new project so you don't overwrite any assets in your project.

SpawnGrid spawns prefabs in a grid formation with a delay.

Other samples use empty game objects as spawn points.

If you have spawn point objects in the scene, consider parenting them to an empty game object and search for the Get Next Child action on the forums. This action lets you easily loop through all the children of a GameObject. This would also allow you to organize each wave under a separate named parent (Wave1, Wave2, BonusWave etc.).
Title: Re: Wave Spawning
Post by: jeanfabre on March 21, 2012, 01:13:44 AM
Hi,

 Some custom actions to work with pool manager 2 are now available:

https://hutonggames.fogbugz.com/default.asp?W839 (https://hutonggames.fogbugz.com/default.asp?W839)

You can then combine what you have learn form the playmaker sample and use pm2 to managed the pools.

Bye,

 Jean