Jump to content

Home

Spawn NPCs from trigger


Pseudopath

Recommended Posts

Simple.

 

Create a trigger around the key, which will activate a target_teleport. This teleport area is in a blank room outside your map, which is filled with Stormtroopers. Once you pick up the key, the stormtroopers are teleported to wherever you place the target_position.

 

Here is the tutorial:

 

1)

Create an empty room (solid!) outside your map. Fill it with stormtroopers or whatever you want.

 

2)

Place a trigger_teleport into the room and set it to "inactive"!

 

3)

Give the trigger the variables "target" "key_teleport" and "targetname" "activate_teleport"

 

4)

Place a target_location, wherever you want the troopers to appear and give it the variable "targetname" "key_teleport". The trigger_teleport and the target_location are linked now.

 

5)

Place a trigger_once around the key and give it the variable "target" "key_trigger". No further variables or changes are needed.

 

6)

Create a target_activate (wherever you want) and give it the variables "targetname" "key_trigger" and "target" "activate_teleport".

 

What happens, if you pick up the key?

 

You will fire the trigger_once (5), which will fire the target_activate (6), which in turn activates the teleporter (2). The stormtroopers are then teleported to the target_location (4).

 

happy mapping!

 

Gidion, a.k.a. Dalboz

Link to comment
Share on other sites

I have found a much much MUCH easier way of doing this.

 

1. Create all of the storm troopers in the exact location that you want them to be after they spawn.

 

2. Give each storm trooper the same "targetname" (in the entity window, add a key named "targetname" and a value of whatever you want. Perhaps "1") Make sure all storm troopers (and whatever units you want to spawn at the same time) have the same target name.

 

3. Create your key.

 

4. Create a trigger_once around your key. Set it to "playeronly" and add a key named "target" with the value of whatever you set your storm troopers targetname to ("1" if you took my suggestion). There should now be lines and arrows pointing from the trigger to all of the units you want to spawn.

 

You are now done! When the trigger is set off, the storm troopers will be spawned just as you arranged them, but not before. I guess you can change the trigger to trigger_multiple if you want them to keep coming back if the player trips the trigger again. Play around with it. -Caster

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...