]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
trigger_changelevel. Changing maps when touched
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Oct 2010 11:22:41 +0000 (14:22 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Oct 2010 11:22:41 +0000 (14:22 +0300)
data/qcsrc/server/g_triggers.qc
extra/netradiant-1.5.0-win32/voretournament.game/data/entities.def

index 61e554816bee596f4de27795035dc316c207a6e7..ff85ba0346e03e8a8f140c48c6b347dd589cfdec 100644 (file)
@@ -1815,3 +1815,23 @@ void spawnfunc_trigger_magicear()
        // target:\r
        //   what to trigger\r
 }\r
+\r
+.string chmap;\r
+void trigger_changelevel_touch()\r
+{\r
+       if not (other.iscreature)\r
+               return;\r
+\r
+       EXACTTRIGGER_TOUCH;\r
+\r
+       if (self.chmap == "")\r
+               localcmd("endmatch\n");\r
+       else\r
+               localcmd(strcat("changelevel ", self.chmap, "\n"));\r
+};\r
+\r
+void spawnfunc_trigger_changelevel()\r
+{\r
+       EXACTTRIGGER_INIT;\r
+       self.touch = trigger_changelevel_touch;\r
+};\r
index b6da8754e69c9eb8371894595e60f8ccd4c765d2..d0b261c38cefa8e592c08dbd4ce5d510a099bd18 100644 (file)
@@ -1371,4 +1371,13 @@ fade_time: fade-in time
 fade_rate: fade-out time
 -------- SPAWNFLAGS --------
 START_OFF: the trigger is off initially
+*/
+
+/*QUAKED trigger_changelevel (.5 .5 .5) ? 
+Loads another map when touched by a player. Useful in RPG and single player maps.
+When no chmap key is set, the trigger just ends the match when touched, and the player / team with the highest score at that moment wins.
+-------- KEYS --------
+dmg: amount of damage to deal (default: 1000)
+message: kill message when someone gets killed by this (default: "was in the wrong place")
+message2: kill message when someone gets pushed into this (default: "was thrown into a world of hurt by"). The # character is replaced by the attacker name if present (and it instead does not get appended to the end)
 */
\ No newline at end of file