I'm thinking of having a Parent GameObject (SpawnPoints) with the script and each of the spawn points (spawn1-4) attached as children.
This is my initial thinking for the variables:
Any links to tutorials or other help is appreciated.
Here's the code I came up with that will let you set up Random Enemies, spawnPoints, maxEnemies and min/max time to wait between each respawn.
This works great but I have one hitch to figure out. Sometimes when the Enemy is instantiated, the model will randomly default to the base T-Pose with no components. Furthermore, any other instances spawned at that spawnPoint will also be locked in the base T-pose, overlapping. They have enough time to clear each other's location/spawnPoint so that's not it either.
answered Mar 24 '10 at 08:56 PM
I just added a component like this to a game I'm working on, and I'll explain what we did.
Create a "Spawner" game object, and add various spawn points as children, placing them in the world wherever you want them. Inside of the "Spawner" object, you'd want to do something like this:
That gets all the transform components inside all of the children (which are your spawn points), and then instantiates a prefab at one of the spawn points randomly. Be sure to set the
answered Mar 23 '10 at 06:07 AM
oke, i tried some things. this one was the best working.
but it still won't work properly
please some advice
thanx a lot