]> de.git.xonotic.org Git - xonotic/xonotic-maps.pk3dir.git/blobdiff - scripts/entities.def
TUBA spawnflag for trigger_magicear
[xonotic/xonotic-maps.pk3dir.git] / scripts / entities.def
index 4aa7a474013823006f6558621a767e46f66318a1..f39ecd4d933fbb66051da05249e48657599c680f 100644 (file)
@@ -146,13 +146,16 @@ dmg: damage to inflict when blocked (when triggered and someone is in the way)
 sounds: when 1, use default door sounds
 noise1: sound when the door opens
 noise2: sound when the door closes
+itemkeys: keys required to open this door.
 -------- SPAWNFLAGS --------
 START_OPEN: causes the door to move to its destination when spawned, and operate in reverse.  It is used to temporarily or permanently close off an area when triggered (not useful for touch or damage triggered doors).
 DOOR_DONT_LINK: the door won't link with another door it touches
-GOLD_KEY: causes the door to open only if the activator holds a gold key.
-SILVER_KEY: causes the door to open only if the activator holds a silver key.
+GOLD_KEY: causes the door to open only if the activator holds a gold key (Q1 compatibility).
+SILVER_KEY: causes the door to open only if the activator holds a silver key (Q1 compatibility).
 TOGGLE: causes the door to wait in both the start and end states for a trigger event.
 NOSPLASH: if set, splash damage cannot activate the door, only direct damage can (requires health to be set)
+-------- NOTES --------
+More information about keys can be found in item_key description.
 */
 
 /*QUAKED func_door_rotating (0 .5 .8) ? START_OPEN BIDIR DOOR_DONT_LINK BIDIR_IN_DOWN - TOGGLE X_AXIS Y_AXIS NOSPLASH
@@ -575,6 +578,33 @@ FLOATING: the item will float in air, instead of aligning to the floor by fallin
 modeldisabled="models/items/g_invincible.md3"
 */
 
+/*QUAKED item_key (0 .5 .8) (-16 -16 -24) (16 16 32) FLOATING
+A key entity.
+The itemkeys should contain one of the following key IDs:
+1 - GOLD key - 
+2 - SILVER key
+4 - BRONZE key
+8 - RED keycard
+16 - BLUE keycard
+32 - GREEN keycard
+Custom keys:
+... - last key is 1<<23
+Keys with bigger Id than 32 don't have a default netname and model, if you use one of them, you MUST provide those.
+-----------KEYS------------
+colormod: color of the key (default: '.9 .9 .9').
+itemkeys: a key Id.
+message: message to print when player picks up this key.
+model: custom key model to use.
+netname: the display name of the key.
+noise: custom sound to play when player picks up the key.
+-------- SPAWNFLAGS --------
+FLOATING: the item will float in air, instead of aligning to the floor by falling
+---------NOTES----------
+This is the only correct way to put keys on the map!
+
+itemkeys MUST always have exactly one bit set.
+*/
+
 /*QUAKED item_key1 (0 .5 .8) (-16 -16 -24) (16 16 32) FLOATING
 SILVER key.
 -----------KEYS------------
@@ -585,10 +615,11 @@ noise: custom sound to play when player picks up the key.
 -------- SPAWNFLAGS --------
 FLOATING: the item will float in air, instead of aligning to the floor by falling
 ---------NOTES----------
+Don't use this entity on new maps! Use item_key instead.
 */
 
 /*QUAKED item_key2 (0 .5 .8) (-16 -16 -24) (16 16 32) FLOATING
-GOLDEN key.
+GOLD key.
 -----------KEYS------------
 colormod: color of the key (default: '1 .9 0').
 message: message to print when player picks up this key.
@@ -597,6 +628,7 @@ noise: custom sound to play when player picks up the key.
 -------- SPAWNFLAGS --------
 FLOATING: the item will float in air, instead of aligning to the floor by falling
 ---------NOTES----------
+Don't use this entity on new maps! Use item_key instead.
 */
 
 /*QUAKED item_minst_cells (.3 .3 1) (-30 -30 0) (30 30 32) FLOATING
@@ -803,8 +835,8 @@ _castshadows: Allows per-entity control over shadow casting. Defaults to 0 on en
 _receiveshadows: Allows per-entity control over shadow reception. Defaults to 1 on everything (world shadows). 0 = receives NO shadows. > 1 = receive shadows only from corresponding keyed entities (see above) and world. < 1 = receive shadows ONLY from corresponding keyed entities.
 _clone: copies brushes from entity with identical _clonename. Still needs a single brush that will get replaced.
 _clonename: template name so one can clone from it
-min: override automatically found minimum coordinate bounds
-max: override automatically found maximum coordinate bounds
+mins: override automatically found minimum coordinate bounds
+maxs: override automatically found maximum coordinate bounds
 targetname: if targeted by a misc_model, its brushes get inserted into this
 _celshader: Sets the cel shader used for this geometry. Note: omit the "textures/" prefix.
 */
@@ -835,8 +867,8 @@ _castshadows: Allows per-entity control over shadow casting. Defaults to 0 on en
 _receiveshadows: Allows per-entity control over shadow reception. Defaults to 1 on everything (world shadows). 0 = receives NO shadows. > 1 = receive shadows only from corresponding keyed entities (see above) and world. < 1 = receive shadows ONLY from corresponding keyed entities.
 _clone: copies brushes from entity with identical _clonename. Still needs a single brush that will get replaced.
 _clonename: template name so one can clone from it
-min: override automatically found minimum coordinate bounds
-max: override automatically found maximum coordinate bounds
+mins: override automatically found minimum coordinate bounds
+maxs: override automatically found maximum coordinate bounds
 targetname: if targeted by a misc_model, its brushes get inserted into this
 _celshader: Sets the cel shader used for this geometry. Note: omit the "textures/" prefix.
 */
@@ -888,8 +920,8 @@ _castshadows: Allows per-entity control over shadow casting. Defaults to 0 on en
 _receiveshadows: Allows per-entity control over shadow reception. Defaults to 1 on everything (world shadows). 0 = receives NO shadows. > 1 = receive shadows only from corresponding keyed entities (see above) and world. < 1 = receive shadows ONLY from corresponding keyed entities.
 _clone: copies brushes from entity with identical _clonename. Still needs a single brush that will get replaced.
 _clonename: template name so one can clone from it
-min: override automatically found minimum coordinate bounds
-max: override automatically found maximum coordinate bounds
+mins: override automatically found minimum coordinate bounds
+maxs: override automatically found maximum coordinate bounds
 targetname: if targeted by a misc_model, its brushes get inserted into this
 _celshader: Sets the cel shader used for this geometry. Note: omit the "textures/" prefix.
 */
@@ -919,8 +951,8 @@ _castshadows: Allows per-entity control over shadow casting. Defaults to 0 on en
 _receiveshadows: Allows per-entity control over shadow reception. Defaults to 1 on everything (world shadows). 0 = receives NO shadows. > 1 = receive shadows only from corresponding keyed entities (see above) and world. < 1 = receive shadows ONLY from corresponding keyed entities.
 _clone: copies brushes from entity with identical _clonename. Still needs a single brush that will get replaced.
 _clonename: template name so one can clone from it
-min: override automatically found minimum coordinate bounds
-max: override automatically found maximum coordinate bounds
+mins: override automatically found minimum coordinate bounds
+maxs: override automatically found maximum coordinate bounds
 targetname: if targeted by a misc_model, its brushes get inserted into this
 _celshader: Sets the cel shader used for this geometry. Note: omit the "textures/" prefix.
 */
@@ -1098,27 +1130,23 @@ strength: "wind field", "gravity field": amount of force per second to apply. "d
 falloff: "gravity field": 0 means no falloff, 1 means linear falloff (zero at the outside), 2 means inverted linear falloff (zero at the inside)
 */
 
-/*QUAKED trigger_keylock (.0 .5 .8) ? - - - GOLD_KEY SILVER_KEY
+/*QUAKED trigger_keylock (.0 .5 .8) ?
 Keylock trigger.  Must target other entities.
 This trigger will trigger target entities when all required keys are provided.
 -------- KEYS --------
-wait: prevent triggering again for this amount of time (default: 5) - applies to target2, target3, target4.
-sounds: 1 to play misc/secret.wav, 2 to play misc/talk.wav, 3 to play misc/trigger1.wav
+itemkeys: A bit field with key IDs that are needed to open this lock.
+sounds: 1 to play misc/secret.wav, 2 to play misc/talk.wav, 3 to play misc/trigger1.wav (3 is default)
 target: trigger all entities with this targetname when triggered and all keys have been given to it, then remove this trigger
 target2: trigger all entities with this targetname when triggered without giving it all the required keys.
-target3: trigger all entities with this targetname when triggered with GOLD_KEY missing (requires GOLD_KEY spawnflag)
-target4: trigger all entities with this targetname when triggered with SILVER_KEY missing (requires SILVER_KEY spawnflag)
+killtarget: remove all entities with this targetname when triggered with all the needed keys.
 message: print this message to the player who activated the trigger when all needed keys have been given.
 message2: print this message to the player who activated the trigger when not all of the needed keys have been given.
 noise: sound to play when lock gets unlocked (default: see sounds)
-noise1: sound to play when only one of the needed key was used (default: misc/decreasevalue.wav)
+noise1: sound to play when only some of the needed key were used but not all (default: misc/decreasevalue.wav)
 noise2: sound to play when a key is missing (default: misc/talk.wav)
-killtarget: remove all entities with this targetname when triggered with all the needed keys.
--------- SPAWNFLAGS --------
-GOLD_KEY: causes the door to open only if the activator holds a gold key.
-SILVER_KEY: causes the door to open only if the activator holds a silver key.
+wait: prevent triggering again for this amount of time (default: 5) - applies to target2, target3, target4.
 ---------NOTES----------
-If spawned without any key specified, this trigger will remove itself.
+If spawned without any key specified in itemkeys, this trigger will display an error and remove itself.
 message2 and noise2 will be resent to the player every 2 seconds while he is in the trigger zone.
 */
 
@@ -1197,6 +1225,20 @@ message: print this message to the player who activated the trigger
 killtarget: remove all entities with this targetname when triggered
 */
 
+/*QUAKED trigger_secret (.5 .5 .5) ?
+Variable sized secret trigger. Can be targeted at one or more entities.
+Basically, it's a trigger_once that additionally updates the number of secrets found.
+-------- KEYS --------
+sounds: 1 to play misc/secret.wav, 2 to play misc/talk.wav, 3 to play misc/trigger1.wav (default: 1)
+noise: path to sound file, if you want to play something else
+target: trigger all entities with this targetname when triggered
+message: print this message to the player who activated the trigger instead of the standard 'You found a secret!'
+killtarget: remove all entities with this targetname when triggered
+-------- NOTES --------
+You should create a common/trigger textured brush covering the entrance to a secret room/area.
+Trigger secret can only be trigger by a player's touch and can not be a target itself.
+*/
+
 /*QUAKED trigger_swamp (.5 .5 .5) ? 
 Players getting into the swamp will get slowed down and damaged
 -------- KEYS --------
@@ -1937,7 +1979,7 @@ FLOATING: the item will float in air, instead of aligning to the floor by fallin
 modeldisabled="models/items/g_jetpack.md3"
 */
 
-/*QUAKED trigger_magicear (0 0 1) (-8 -8 -8) (8 8 8) IGNORE_SAY IGNORE_TEAMSAY IGNORE_TELL IGNORE_INVALIDTELL REPLACE_WHOLE_MESSAGE REPLACE_OUTSIDE CONTINUE NODECOLORIZE
+/*QUAKED trigger_magicear (0 0 1) (-8 -8 -8) (8 8 8) IGNORE_SAY IGNORE_TEAMSAY IGNORE_TELL IGNORE_INVALIDTELL REPLACE_WHOLE_MESSAGE REPLACE_OUTSIDE CONTINUE NODECOLORIZE TUBA
 Triggers targets when a given magic word has been said
 -------- KEYS --------
 message: message to wait for (can start or end with * for wildcards)
@@ -1948,6 +1990,7 @@ target2: all entities with a matching targetname will be triggered.
 target3: all entities with a matching targetname will be triggered.
 target4: all entities with a matching targetname will be triggered.
 target_random: instead of triggering ALL matched entities, trigger ONE of them by random
+movedir: if TUBA is set, this is a string of "instrument+1 mintempo maxtempo". Components can be set to 0 to not match.
 -------- SPAWNFLAGS --------
 IGNORE_SAY: do not respond to "say" messages
 IGNORE_TEAMSAY: do not respond to "say_team" messages
@@ -1957,6 +2000,8 @@ REPLACE_WHOLE_MESSAGE: replace the whole message by netname, or drop the message
 REPLACE_OUTSIDE: also perform the replacement when outside the radius (to hide the "secret word")
 CONTINUE: even if this magic ear matched, continue looking for further matches/replacements (useful for swear word filters)
 NODECOLORIZE: do not decolorize the input string before matching
+TUBA: the message is a space separated note sequence that must be played on the @!#%'n Tuba or the @!#%'n Accordeon. For example, 4.25 means a quarter note at pitch 4, where 0 is base pitch (red team primary fire with no motion). For secret triggers to open doors, use 4.25 0.25 4.25 2.25. The first one to encode a rickroll in this gets slapped with the shotgun.
+TUBA_EXACTPITCH: the note pitch must be accurate and cannot be transposed
 */
 
 /*QUAKED weapon_fireball (1 0 .5) (-30 -30 0) (30 30 32) FLOATING