r5404 - in trunk/data: qcsrc/server scripts

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Jan 5 05:37:33 EST 2009


Author: div0
Date: 2009-01-05 05:37:32 -0500 (Mon, 05 Jan 2009)
New Revision: 5404

Modified:
   trunk/data/qcsrc/server/g_triggers.qc
   trunk/data/scripts/entities.def
Log:
new entity trigger_gamestart that triggers once at startup


Modified: trunk/data/qcsrc/server/g_triggers.qc
===================================================================
--- trunk/data/qcsrc/server/g_triggers.qc	2009-01-05 08:47:18 UTC (rev 5403)
+++ trunk/data/qcsrc/server/g_triggers.qc	2009-01-05 10:37:32 UTC (rev 5404)
@@ -1322,7 +1322,25 @@
 
 
 
+void gamestart_use() {
+	activator = self;
+	SUB_UseTargets();
+	remove(self);
+}
 
+void spawnfunc_trigger_gamestart() {
+	if(self.wait)
+	{
+		self.think = gamestart_use;
+		self.nextthink = self.wait;
+	}
+	else
+		InitializeEntity(self, gamestart_use, INITPRIO_FINDTARGET);
+}
+
+
+
+
 .entity voicescript; // attached voice script
 .float voicescript_index; // index of next voice, or -1 to use the randomized ones
 .float voicescript_nextthink; // time to play next voice

Modified: trunk/data/scripts/entities.def
===================================================================
--- trunk/data/scripts/entities.def	2009-01-05 08:47:18 UTC (rev 5403)
+++ trunk/data/scripts/entities.def	2009-01-05 10:37:32 UTC (rev 5404)
@@ -1114,6 +1114,13 @@
 START_ON: assume it is already turned on (when targeted)
 */
 
+/*QUAKED trigger_gamestart (.5 .5 .5) (-8 -8 -8) (8 8 8) FIXED
+Triggers once when the game starts, then no longer does anything.
+-------- KEYS --------
+target: trigger all entities with this targetname when triggered
+wait: wait so many seconds before triggering
+*/
+
 /*QUAKED misc_follow (.5 .5 .5) (-8 -8 -8) (8 8 8)
 Makes one entity follow another. Will not work with all entities.
 -------- KEYS --------




More information about the nexuiz-commits mailing list