Zombie Panic! Source mapping guide - Part 3
This tutorial contains dynamic zombie spawns and random objective items.
Dynamic Zombie Spawns:
What do you need:
info_player_zombie
point_teleport
Setup:
Open the properties for info_player_zombie
Turn off SmartEdit
Press 'Add'
In 'Key:' field type: targetname (exactly that)
In 'Value:' type the name you want it to have: zombie1 (for example)
Apply
(Picture1: Setup of info_player_zombie)
Open properties for the point_teleport
If SmartEdit isn't On you can turn it back on if you want.
Set it up like this
Name: teleporter1 (name of your teleporter)
Entity to teleport: zombie1 (name of your zombiespawn to teleport
(Picture 2: Setup of point_teleporter)
Trigger it
Make a trigger brush and tie it to trigger_once
Add output:
My output named OnStartTouch
Targets entites named teleporter1 (name of your teleporter)
Via this input Teleport
Summary:
On mapstart the zombie spawns where you first placed the info_player_zombie.
They will continue to spawn there until someone enters the trigger brush. When someone trigger the brush the point_teleport will teleport the info_player_zombie entity to itself.
So next time a zombie spawn they will spawn at the place where the point_teleport is located.
This can of course be setup with other things than trigger brushes. I just showed the simplest way to do it.
Remember to teleport all info_player_zombie entities if you want all zombies to spawn at a certain place.
The spawnpoints can be teleporterd to many places, back and forth with different point_teleports.
See bottom of the page for a Tutorial map download.
Random Objective Items
What do you need:
prop_dynamic
func_button
point_teleport (atleast 2)
logic_case
trigger_once
Setup:
Open properties for the prop_dynamic
Set it up like this
Name: prop_item (the name you want it to have)
World model: models/zp_props/keychain.mdl (choose any model you like)
Open properties for the func_button
Set it up like this
Parent: prop_item
Open properties for the first point_teleport
Set it up like this
Name: teleporter1 (name of your teleporter)
Entity to teleport: prop_item (name your item to teleport)
Open properties for the second point_teleport
Set it up like this
Name: teleporter2 (name of your teleporter)
Entity to teleport: prop_item (name your item to teleport)
Open properties for the logic_case
Set it up like this
Name: pick_random_item (name of your logic_case)
Add output:
My output named OnCase1
Targets entites named teleporter1 (name of your first teleporter)
Via this input Teleport
Add another output:
My output named OnCase2
Targets entites named teleporter2 (name of your second teleporter)
Via this input Teleport
(See picture 3)
Make a trigger brush and tie it to trigger_once
Add output:
My output named OnStartTouch
Targets entites named pick_random_item
Via this input PickRandom
(Picture 3: Logic_case outputs)
Summary:
When someone enters the trigger brush it will call the logic_case to pick randomly one of your two teleporters.
By doing this the object item can be teleported to two different places.
The func_button is attached to model so it will follow it when it is teleported.
The trigger once can for example be placed inside the lobby so the items will be randomly placed each new round.
For each new teleporter you must have an output for it in the logic_case.
Tutorial Map download