From: MirceaKitsune Date: Sat, 2 Oct 2010 11:22:41 +0000 (+0300) Subject: trigger_changelevel. Changing maps when touched X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a9c691665d545fed4f6f0d1bde95e15e8104a985;p=voretournament%2Fvoretournament.git trigger_changelevel. Changing maps when touched --- diff --git a/data/qcsrc/server/g_triggers.qc b/data/qcsrc/server/g_triggers.qc index 61e55481..ff85ba03 100644 --- a/data/qcsrc/server/g_triggers.qc +++ b/data/qcsrc/server/g_triggers.qc @@ -1815,3 +1815,23 @@ void spawnfunc_trigger_magicear() // target: // what to trigger } + +.string chmap; +void trigger_changelevel_touch() +{ + if not (other.iscreature) + return; + + EXACTTRIGGER_TOUCH; + + if (self.chmap == "") + localcmd("endmatch\n"); + else + localcmd(strcat("changelevel ", self.chmap, "\n")); +}; + +void spawnfunc_trigger_changelevel() +{ + EXACTTRIGGER_INIT; + self.touch = trigger_changelevel_touch; +}; diff --git a/extra/netradiant-1.5.0-win32/voretournament.game/data/entities.def b/extra/netradiant-1.5.0-win32/voretournament.game/data/entities.def index b6da8754..d0b261c3 100644 --- a/extra/netradiant-1.5.0-win32/voretournament.game/data/entities.def +++ b/extra/netradiant-1.5.0-win32/voretournament.game/data/entities.def @@ -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