EntitiesTraps
click for full size image in pop-up window trap_bouncingbetty
 
Description
 
Bouncing Betty trap. When the player gets within a certain distance (around 128 units), the iris will open and eject a bomb upward that explodes at the height of the player's torso (when placed at floor height). It will self destruct after the second bomb in proximity mode (see notes below).
 
Keys
 
angle: initial orientation of model in game (default: 0).
model: name of entity's model definition file (iris.def). Do not change.
anim: default "Idle" animation alias name of model. Points to a .sam animation file in the model's .def file. See Notes below.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
targetname: name referred to when controlled by a script or trigger.

Spawnflags
 
None

Notes

The anim key cannot be used directly to change the model's initial animation in the game. A script with animation commands (anim, nextanim, animate, etc.) must be used for this. For this particular model, there are 3 possible animations: idle, open, and close.

However, changing the value of the anim key in SinEd by using the + and - buttons in the entity dialog and using the "Toggle animations" feature (CTRL-A) can be useful for browsing the model's different animations directly in the 3D view. This information can then be used to set the animation commands in the script to the desired animations.

Since this trap always ejects its bombs upwards, it is meant to be set on floors. So don't try to set an "angles" value for it. Also, since the trap itself is destructible by default, it is damaged by its own bombs and is destroyed right after the second one. If you want the trap to be indestructible so it can work more than twice, you'll have to give it a targetname (betty1 for example) and use the following script command:

$betty1 nodamage

This will make it indestructible but if it's targeted, Bouncing Betty will only be activated when triggered. So you'll either have to put a trigger_multiple that points to it in your map or use the script command:

trigger $betty1

Every time Bouncing Betty is triggered, it ejects a bomb.


click for full size image in pop-up window trap_camgun
 
Description
 
Rotating security turret that tracks players. This is actually an actor class entity but has no defined AI.
 
Keys
 
angle: initial orientation of model and reference "zero" angle of camgun.
angles: pitch, yaw, roll method of 3D orientation for model (default: 0 0 0).
model: name of entity's model definition file (camgun2.def). Do not change.
anim: default "Idle" animation alias name of model. Points to a .sam animation file in the model's .def file. See Notes below.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
target: the entity this points to will be triggered when object is destroyed.
targetname: name referred to when controlled by a script or trigger.
yawrange: defines the yaw boundary of the camgun.
pitchrange: defines the pitch boundary of the camgun.
wakeupdistance:* distance at which the camgun senses players (Default is 750).
firingdistance:* distance at which the camgun will fire at players (Default is 800).
sightthread: name of thread to call when turret sees a player.
sighttarget: target to fire when turret sees a player.
patience: amount of time the turret will continue to fire at players once they're out of it's sight range.
lagtime: amount of time to wait between the turret spotting the player and then actually firing.

Spawnflags
 
None

Notes

The anim key cannot be used directly to change the model's initial animation in the game. A script with animation commands (anim, nextanim, animate, etc.) must be used for this. For this particular model, there are 5 possible animations: down_idle, up_idle, lower, raise and fire.

However, changing the value of the anim key in SinEd by using the + and - buttons in the entity dialog and using the "Toggle animations" feature (CTRL-A) can be useful for browsing the model's different animations directly in the 3D view. This information can then be used to set the animation commands in the script to the desired animations.

The camgun's 'angle' or 'angles' setting (depending on which one is used) automatically becomes its own "zero degree" reference angle and the 'yawrange' and 'pitchrange' values are set relatively to that reference. For example, if you have a camgun set to angle 45 and a yawrange of 45, it will be able to traverse up to 45 degrees either left or right from its original orientation. In absolute map orientation values, this translates into a traverse arc that ranges from 0 degrees to 90 degrees. The same principle holds for the pitchrange value.

* Always make sure that wakeupdistance < firingdistance.

If you give the camgun a targetname (camgun1 for example), it will only be activated when triggered by a trigger in your map or either one of these script commands:

trigger $camgun1

$camgun1 activate


To deactivate the camgun, just use the command:

$camgun1 deactivate


click for full size image in pop-up window trap_claymore
 
Description
 
Claymore mine. Static model, doesn't explode or do anything by itself.
 
Keys
 
angle: initial orientation of model in game (default: 0).
angles: pitch, yaw, roll method of 3D orientation for model (default: 0 0 0).
model: name of entity's model definition file (claymore.def). Do not change.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
target: the entity this points to will be triggered when object is destroyed.
killtarget: the entity this points to will be removed when object is destroyed.
targetname:
name referred to when controlled by a script.

Spawnflags
 
1 NOT SOLID
2 NOT DAMAGEABLE

Notes

This is not really a trap by itself but since it will fire its targets when destroyed, it's very easy to make one out of it. Just place a func_exploder entity in front of it and target it with the this entity to create the illusion of a claymore mine. It's also possible to make it more sophisticated by using additional triggers and scripting.


click for full size image in pop-up window trap_dynamite
 
Description
 
Dynamite Trap. Static model, doesn't explode or do anything by itself.
 
Keys
 
angle: initial orientation of model in game (default: 0).
angles: pitch, yaw, roll method of 3D orientation for model (default: 0 0 0).
model: name of entity's model definition file (dynamite.def). Do not change.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
target: the entity this points to will be triggered when object is destroyed.
killtarget: the entity this points to will be removed when object is destroyed.
targetname:
name referred to when controlled by a script.

Spawnflags
 
1 NOT SOLID
2 NOT DAMAGEABLE

Notes

This is not really a trap by itself but since it will fire its targets when destroyed, it's very easy to make one out of it. Just place a func_exploder entity in front of it and target it with the this entity to create the illusion of a dynamite explosion. You can use additional triggers and scripting to create the illusion of a timed dynamite explosion (this is how it was done in Ritual's Abandoned Building map: abandoned.scr).


click for full size image in pop-up window trap_missilelauncher_base
 
Description
 
Missile Launcher - Base. Static model.
 
Keys
 
angle: initial orientation of model in game (default: 0).
angles: pitch, yaw, roll method of 3D orientation for model (default: 0 0 0).
model: name of entity's model definition file (launcher_base.def). Do not change.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
target: the entity this points to will be triggered when object is destroyed.
killtarget: the entity this points to will be removed when object is destroyed.
targetname:
name referred to when controlled by a script.

Spawnflags
 
1 NOT SOLID
2 NOT DAMAGEABLE

Notes

Since this is a simple static object, it is best used as a decorative tripod for anything you can think of. But it isn't really meant to be used it as the base for the trap_missilelauncher_top entity. If what you need is a complete rocket turret, it's much preferable to use the trap_rocketturret entity instead. Please refer to the notes for that entity below for more details.


click for full size image in pop-up window trap_missilelauncher_top
 
Description
 
Missile Launcher - Top. Fires guided missiles. Activates when it sees the player. This is actually an actor class entity but has no defined AI. See notes below.
 
Keys
 
angle: initial orientation of model in game (default: 0).
angles: pitch, yaw, roll method of 3D orientation for model (default: 0 0 0).
model: name of entity's model definition file (launcher_top.def). Do not change.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
targetname:
name referred to when controlled by a script. This entity is not controllable though. See notes below.

Spawnflags
 
None

Notes

Although this launcher is operational as such, it is plagued by some major flaws:

First, it activates on sight, fires like mad at the player at a senseless rate (about 2 missiles per second) but most of all does not respond to triggering by a map trigger or script commands. Therefore, it cannot be activated or deactivated in a controlled manner and its rate of fire cannot be changed either.

Second, this turret can not be "anchored" in its location so it will be displaced by its own blast if it's missiles indvertently hit a nearby wall or floor while trying to aim at the player. If this occurs enough times, the turret will move back into a wall and cease functionning altogether.

Third, if you manage to kill it before it drifts through the map's boundary wall's, it simply freezes in place. This could be fixed with the "flags" script command though. In conclusion, this turret although functional as such operates in a completely chaotic manner and offers absolutely no script control.

So if what you need is a complete functioning rocket turret, it is strongly recommended to use a trap_rocketturret entity instead. It looks exactly the same and fires the same projectiles but it already comes with its tripod and is both triggerable and controllable by script commands. Plus it's firmly anchored to it's location and won't move around like this one.


click for full size image in pop-up window trap_oldlauncher
 
Description
 
Old Launcher Model. Static model, doesn't launch rockets or do anything by itself.
 
Keys
 
angle: initial orientation of model in game (default: 0).
angles: pitch, yaw, roll method of 3D orientation for model (default: 0 0 0).
model: name of entity's model definition file (launcher.def). Do not change.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
target: the entity this points to will be triggered when object is destroyed.
killtarget: the entity this points to will be removed when object is destroyed.
targetname:
name referred to when controlled by a script.

Spawnflags
 
1 NOT SOLID
2 NOT DAMAGEABLE

Notes

This model is a strange combination of polygons and sprites (that's the reason why I couldn't get a decent screenshot of it). Perfect for an "antique & ugly weapons" museum decoration if your map happens to follow that theme ;)


click for full size image in pop-up window trap_rocketturret
 
Description
 
Guided missile turret, complete with base. This is actually an actor class entity but has no defined AI. Special case, see notes below.
 
Keys
 
angle: initial orientation of model in game (default: 0).
angles: pitch, yaw, roll method of 3D orientation for model (default: 0 0 0).
model: name of entity's model definition file (rockturtop.def). Do not change.
anim: default "Idle" animation alias name of model. Points to a .sam animation file in the model's .def file. See Notes below.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
target: the entity this points to will be triggered when object is destroyed.
targetname: name referred to when controlled by a script or trigger.
wakeupdistance:* distance at which the turret senses players (Default is 750).
firingdistance:* distance at which the turret will fire at players (Default is 800).
sightthread: name of thread to call when turret sees a player.
sighttarget: target to fire when turret sees a player.

Spawnflags
 
None

Notes

The anim key cannot be used directly to change the model's initial animation in the game. A script with animation commands (anim, nextanim, animate, etc.) must be used for this. For this particular model, there are 5 possible animations: down_idle, up_idle, lower, raise and fire.

However, changing the value of the anim key in SinEd by using the + and - buttons in the entity dialog and using the "Toggle animations" feature (CTRL-A) can be useful for browsing the model's different animations directly in the 3D view. This information can then be used to set the animation commands in the script to the desired animations.

If targeted, turret will only be activated when triggered. This entity has a particularity: when inserted in SinEd, the top part of a security turret model is displayed in the camera view but the actual turret that appears in the game is the turret shown in the screenshot above.

The reason for this is an error in the original rockturtop.def file that you extract from the SiN Pak file Pak0.sin. However, by using my corrected version of this .def file included in the Sin entity definition files package, you will avoid this problem entirely and the proper model and bounding box will appear in SinEd's design views. I strongly recommend that you download it from the Tools section.

* Always make sure that wakeupdistance < firingdistance.

This turret can be triggered by a trigger in the map or controlled by script commands. Just give it a targetname (turret1 for example) and use the following.

To activate the turret:

$turret1 activate or trigger $turret1

To deactivate the turret:

$turret1 deactivate

To change the rate of fire of the turret:

$turret1 rocketrate 3 (one rocket every 3 seconds)

To set the damage points needed to destroy the turret:

$turret1 health 500 (for example)

To make the turret indestructible:

$turret1 nodamage


click for full size image in pop-up window trap_rocketturret_base
 
Description
 
Rocket turret base. World object with a choice of 4 animations.
 
Keys
 
angle: initial orientation of model in game (default: 0).
angles: pitch, yaw, roll method of 3D orientation for model (default: 0 0 0).
model: name of entity's model definition file (rockturbase.def). Do not change.
anim: default "Idle" animation alias name of model. Points to a .sam animation file in the model's .def file. See Notes below.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
target: the entity this points to will be triggered when object is destroyed.
killtarget: the entity this points to will be removed when object is destroyed.
targetname:
name referred to when controlled by a script.

Spawnflags
 
1 NOT SOLID
2 NOT DAMAGEABLE

Notes

The anim key cannot be used directly to change the model's initial animation in the game. A script with animation commands (anim, nextanim, animate, etc.) must be used for this. For this particular model, there are 4 possible animations: down_idle, up_idle, lower and raise.

However, changing the value of the anim key in SinEd by using the + and - buttons in the entity dialog and using the "Toggle animations" feature (CTRL-A) can be useful for browsing the model's different animations directly in the 3D view. This information can then be used to set the animation commands in the script to the desired animations.

Here's a quick example on how you can make the turret base raise when you touch a trigger in the game:

First, give your turret base a targetname of base1 (for example). Then, create a trigger_once in your map and give it the following key value:

thread = Turretbase_raise

Next, create a script and write the following thread:

Turretbase_raise:
$base1 nodamage
$base1 nextanim raise
$base1 animate
waitFor $base1
end


When you touch the trigger in the game, the thread will be executed and the turret base will raise.


click for full size image in pop-up window trap_securityturret
 
Description
 
Security turret, complete with retractable base. This is actually an actor class entity but has no defined AI. See notes below.
 
Keys
 
angle: initial orientation of model and reference "zero" angle of camgun.
model: name of entity's model definition file (turtop.def). Do not change.
anim: default "Idle" animation alias name of model. Points to a .sam animation file in the model's .def file. See Notes below.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
target: the entity this points to will be triggered when object is destroyed.
targetname: name referred to when controlled by a script or trigger.
wakeupdistance:* distance at which the turret senses players (Default is 750).
firingdistance:* distance at which the turret will fire at players (Default is 800).
sightthread: name of thread to call when turret sees a player.
sighttarget: target to fire when turret sees a player.
patience: amount of time the turret will continue to fire at players once they're out of it's sight range.
lagtime: amount of time to wait between the turret spotting the player and then actually firing.

Spawnflags
 
None

Notes

The anim key cannot be used directly to change the model's initial animation in the game. A script with animation commands (anim, nextanim, animate, etc.) must be used for this. For this particular model, there are 5 possible animations: down_idle, up_idle, lower, raise and fire.

However, changing the value of the anim key in SinEd by using the + and - buttons in the entity dialog and using the "Toggle animations" feature (CTRL-A) can be useful for browsing the model's different animations directly in the 3D view. This information can then be used to set the animation commands in the script to the desired animations.

If targeted, turret will only be activated when triggered. When inserted in SinEd, only the top portion of the security turret appears in the camera view. Despite this, the whole turret with functional base will appear in the game. Note that only the top portion of the turret is destructible, the turret's base is indestructible and will remain in the game after the top part is destroyed.

Also don't try to set an "angles" value to this turret as this will orient only the top part of the turret. The turret's base will remain vertical and the alignment between itself and the top part will be screwed up.

* Always make sure that wakeupdistance < firingdistance.

This turret can be triggered by a trigger in the map or controlled by script commands. Just give it a targetname (turret1 for example) and use the following.

To activate the turret:

$turret1 activate or trigger $turret1

To deactivate the turret:

$turret1 deactivate

To set the damage points needed to destroy the turret:

$turret1 health 500 (for example)

To make the turret indestructible:

$turret1 nodamage


click for full size image in pop-up window trap_securityturret_base
 
Description
 
Security turret base. World object with a choice of 4 animations. This is 100% identical to the trap_rocketturret_base entity so using this one or the other makes no difference.
 
Keys
 
angle: initial orientation of model in game (default: 0).
angles: pitch, yaw, roll method of 3D orientation for model (default: 0 0 0).
model: name of entity's model definition file (turbase.def). Do not change.
anim: default "Idle" animation alias name of model. Points to a .sam animation file in the model's .def file. See Notes below.
scale: controls size of model in the game (ex: 1.0).
alpha: translucency of model in game. Values are from 0-1 (default: 1).
target: the entity this points to will be triggered when object is destroyed.
killtarget: the entity this points to will be removed when object is destroyed.
targetname:
name referred to when controlled by a script.

Spawnflags
 
1 NOT SOLID
2 NOT DAMAGEABLE

Notes

The anim key cannot be used directly to change the model's initial animation in the game. A script with animation commands (anim, nextanim, animate, etc.) must be used for this. For this particular model, there are 4 possible animations: down_idle, up_idle, lower and raise.

However, changing the value of the anim key in SinEd by using the + and - buttons in the entity dialog and using the "Toggle animations" feature (CTRL-A) can be useful for browsing the model's different animations directly in the 3D view. This information can then be used to set the animation commands in the script to the desired animations.