playMaker

Author Topic: Create a monster spawner  (Read 3449 times)

mweyna

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Create a monster spawner
« on: May 06, 2013, 11:03:16 PM »
Hey ya'll, I'm new to unity development, and was hoping someone could point me to in a good direction. I have an idea for a tower defense style game, but have no clue how to approach the concept of a timed monster spawner. Can anyone point me to any tutorials (tried google, failed) on how to create a spawner with playmaker?

Thank you in advance,

Ian.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14595
  • Official Playmaker Support
    • View Profile
Re: Create a monster spawner
« Reply #1 on: May 07, 2013, 12:47:50 AM »
Hi,

 spawners are very easy to implement, you have two ways:

the common strategy is to create a prefab of your monster, check out Unity doc to learn what it is, basically, it's a reusable asset.

 you can do it yourself, by using the action "create Object".
 Or, you can use a pool library, which is more effective if you will have a lot of monsters and targeting mobile. Check out the asset store, for example, Pool Manager is supported with a playmaker set of actions you can get here:

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


in both cases, the timeout system will be hosted by your monster prefab ( you will have a fsm with a delayed event of the timeout value, and then when that event fire, respond to it and use the action "destroy self" for example.

 Also, have you checked the asset store, they are numerous ready made projects for tower of defense games.

bye,

 Jean