Sequential Spawning Tutorial

Started by arramus, March 01, 2007, 08:05:49 AM

Previous topic - Next topic

arramus

Here's a sequential spawning tut for SP and MP type maps. It will allow you to turn your spawn points on and off so they can be used/not used at will.

In SP sequential spawning helps shorted the journey. If you die far into the level it may be a long run back to that point again. By turning off the first spawn point and turning on a spawn point further into the level after you pass it you'll shorten that run time and get a sense of progress.

In MP this can also be used to shorten the distance to a certain point as well as make some crazy random spawning areas both in safe and enemy territory.

This tut focuses on the use of spawn points for SP. In this tut we will only use 2 spawn points.

1. Open your map and select 2 points where you want to spawn from. Place a TriggerPlayerStart Object at each location.
2. The Properties of the starting spawn point will remain as they are. For the spawn point located further in the level you'll need to set Properties > PlayerStart > bEnabled to False. This switches it off and you will not be able to spawn here.
3. Place 2 Triggers (Actor > Triggers > *Trigger) next to the second spawn point that's placed further into the level. Resize their collisions boundaries so that the player will pass through them and activate the Trigger.
4. In one Trigger go to Properties > Events and type the name of one of your TriggerPlayerStart's Tag names. The Tag name in my initial spawn point is TriggeredPlayerStart. I type this into the Event area of my Trigger.
5. In the other Trigger repeat the process using the other TriggerPlayerStart's Tag name. My other spawn point has a Tag name of TriggeredPlayerStart1. I type this into the other Trigger Event area.
6. Build and Save.

The Unreal Engine has already coded a script into the TriggerPlayerStart Objects that reverses their bEnabled setting should a Trigger activate them using the Tag/Event process. Once I step into the collison area of these Triggers (make sure they have all default Properties set like TT_PlayerProximity, bTriggerOnceOnly = True, NormalTrigger) they will reverse their bEnabled Settings. The first spawn point turns to False (Off) and the second turns on True (On).

No more running along empty corridors without being far from the battle zone.

Here are a couple of images testing that everything works as it should.

This is the beginning area with the bEnabled = True TriggerPlayerStart spawn point. Multiple suicides and still only spawning at this point.


After reaching the Triggers' collsion boundary the script to reverse the bEnabled setting is activated. I go through the suicide procedure some more and only spawn at this point.


For more spawn points further into the map repeat the Trigger process to Disable the TriggerPlayerStart behind you and Enable the one you reach.

DooFi

#1
Dude you're back for like 3 days and instantaneously pumping out tutorials! :D

(moved from Forum/Website Technical Section to UE Technical Section)