Trigger multiple

Movie Battles II Modified Entity

## Spawnflags

* **CLIENTONLY** *(1)* - Only a player can trigger this by touch.
* **FACING** *(2)* - Won't fire unless triggering entity's view angles are within 45 degrees of trigger's angles (in addition to any other conditions).
* **USE\_BUTTON** *(4)* - Won't fire unless player is in it and pressing use button (in addition to any other conditions).
* **FIRE\_BUTTON** *(8)* - Won't fire unless player/NPC is in it and pressing fire button (in addition to any other conditions).
* **NPCONLY** *(16)* - Only non-player NPCs can trigger this by touch.
* **INACTIVE** *(128)* - Start off, has to be activated to be touchable/usable.
* **MULTIPLE** *(256)*- Multiple entities can touch this trigger in a single frame \*and\* if needed, the trigger can have a wait of > 0.

## Keys & Values

* **wait** - Seconds between triggering, 0 default, number < 0 means one time only.
* **random** - Wait variance, default is 0.
* **delay** - How many seconds to wait to fire targets after tripped.
* **hiderange** - As long as NPC's head is in this trigger, NPCs out of this hiderange cannot see him. If you set an angle on the trigger, they're only hidden from enemies looking in that direction. the player's crouch viewheight is 36, his standing viewheight is 54. So a trigger that should hide you when crouched but not standing should be 48 tall.
* **target2** - The trigger will fire this only when the trigger has been activated and subsequently 'cleared'( once any of the conditions on the trigger have not been satisfied). This will not fire the 'target' more than once until the 'target2' is fired (trigger field is 'cleared').
* **speed** - How many seconds to wait to fire the target2, default is 1.
* **noise** - Sound to play when the trigger fires (plays at activator's origin).
* **NPC\_targetname** - Only the NPC with this NPC\_targetname fires this trigger.
* **team** - If set, only this team can trip this trigger.
	+ 0 - any
	+ 1 - red
	+ 2 - blue
* **soundSet** - Ambient sound set to play when this trigger is activated
* **usetime** - If specified (in milliseconds) along with the USE\_BUTTON flag, will require a client to hold the use key for x amount of ms before firing.
* **script\_targetname** - Referred to by script as the recipient of set of instructions. Most entities can use this key.
* **min\_players** (MOVIE BATTLES II SPECIFIC) - Minimum player count required in-round for this trigger to be useable.
* **max\_players** (MOVIE BATTLES II SPECIFIC) - Maximum player count in-round for this trigger to be useable.
* **nopush** (MOVIE BATTLES II SPECIFIC) - How many seconds activator of trigger should be immune to force push and pull.
* **teamuser** - If 1, team 2 can't use this. If 2, team 1 can't use this.
* **siegetrig** - If non-0, can only be activated by players carrying a misc\_siege\_item which is associated with this trigger by the item's goaltarget value.
* **teambalance** - If non-0, is 'owned' by the last team that activated. Can only be activated by the other team if the number of players on the other team inside the trigger outnumber the number of players on the owning team inside the trigger.
* **target3** - Fire when activated by team1.
* **target4** - Fire when activated by team2.
* **idealclass** - Can only be used by this class/these classes. You can specify use by multiple classes with the use of, e.g.: 'Imperial Medic|Imperial Assassin|Imperial Demolitionist'

## Entity Code

```
/*QUAKED trigger_multiple (.1 .5 .1) ? CLIENTONLY FACING USE_BUTTON FIRE_BUTTON NPCONLY x x INACTIVE MULTIPLE
===========DESCRIPTION============================
 Variable sized repeatable trigger.
 ===========SPAWNFLAGS=============================
 CLIENTONLY - Only a player can trigger this by touch.

 FACING - Won't fire unless triggering entity's view angles are within 45 degrees of trigger's angles (in addition to any other conditions).

 USE_BUTTON - Won't fire unless player is in it and pressing use button (in addition to any other conditions).

 FIRE_BUTTON - Won't fire unless player/NPC is in it and pressing fire button (in addition to any other conditions).

 NPCONLY - Only non-player NPCs can trigger this by touch.

 INACTIVE - Start off, has to be activated to be touchable/usable.

 MULTIPLE - Multiple entities can touch this trigger in a single frame *and* if needed, the trigger can have a wait of > 0.
 ===========KEYS&VALUES============================
 'wait' - Seconds between triggering, 0 default, number < 0 means one time only.

 'random' - Wait variance, default is 0.

 'delay' - How many seconds to wait to fire targets after tripped.

 'hiderange' - As long as NPC's head is in this trigger, NPCs out of this hiderange cannot see him.  If you set an angle on the trigger, they're only hidden from enemies looking in that direction.  the player's crouch viewheight is 36, his standing viewheight is 54.  So a trigger that should hide you when crouched but not standing should be 48 tall.

 'target2' - The trigger will fire this only when the trigger has been activated and subsequently 'cleared'( once any of the conditions on the trigger have not been satisfied).  This will not fire the 'target' more than once until the 'target2' is fired (trigger field is 'cleared').

 'speed' - How many seconds to wait to fire the target2, default is 1.

 'noise' - Sound to play when the trigger fires (plays at activator's origin).

 'NPC_targetname' - Only the NPC with this NPC_targetname fires this trigger.

 'team' - If set, only this team can trip this trigger.
 	0 - any
 	1 - red
 	2 - blue

 'soundSet' - Ambient sound set to play when this trigger is activated

 'usetime' - If specified (in milliseconds) along with the USE_BUTTON flag, will require a client to hold the use key for x amount of ms before firing.

 'script_targetname' - Referred to by script as the recipient of set of instructions. Most entities can use this key.

 'min_players' (MOVIE BATTLES II SPECIFIC) - Minimum player count required in-round for this trigger to be useable.

 'max_players' (MOVIE BATTLES II SPECIFIC) - Maximum player count in-round for this trigger to be useable.

 'nopush' (MOVIE BATTLES II SPECIFIC) - How many seconds activator of trigger should be immune to force push and pull.

 Applicable only during Siege gametype:
 'teamuser' - If 1, team 2 can't use this. If 2, team 1 can't use this.

 'siegetrig' - If non-0, can only be activated by players carrying a misc_siege_item which is associated with this trigger by the item's goaltarget value.

 'teambalance' - If non-0, is 'owned' by the last team that activated. Can only be activated by the other team if the number of players on the other team inside the trigger outnumber the number of players on the owning team inside the trigger.

 'target3' - Fire when activated by team1.

 'target4' - Fire when activated by team2.

 'idealclass' - Can only be used by this class/these classes. You can specify use by multiple classes with the use of, e.g.: 'Imperial Medic|Imperial Assassin|Imperial Demolitionist'
 ==============NOTES===============================
 Must be targeted at one or more entities.

 The basic time between firing is a random time between (wait - random) and (wait + random)
 */

```