Game Development Community

Spawn areas and objects

by Darkfire Games · in Torque Game Builder · 04/27/2008 (11:53 am) · 2 replies

I have a polygon with the spawn area behavior attached to it.

I want this area to constantly spawn a certain type of enemy, the behavior wants an existing object via the editor, but if that object is killed the area stops spawning enemies because the object it was copying no longer exists.

How do i go about spawning these enemies with behaviors attached during runtime?

#1
04/27/2008 (12:03 pm)
I think there is a "template" behaviour. Have an instance of the enemy you want to continue to spawn in the level and give it the template behaviour (keep everything else the same). This will mean the object is in the level, so you can use it with the spawning behaviour, but it won't be visible or interact with the scene in anyway...so it can't be killed :)
I think the asteroids tutorial on TDN has an example of this being used.
#2
04/27/2008 (10:53 pm)
Perfect, thank you.