Skip to main content

idTrigger

An entity that will trigger its listed targets when used.

Usage

entity {
	entityDef mod_trigger_1 {
	inherit = "trigger/trigger";
	class = "idTrigger";
	expandInheritance = false;
	poolCount = 0;
	poolGranularity = 2;
	networkReplicated = false;
	disableAIPooling = false;
	edit = {
		removeFlag = "RMV_NEVER";
		spawnPosition = {
			x = 1;
			z = 1;
			y = 1;
		}
		renderModelInfo = {
			model = NULL;
			scale = {
				x = 1;
				y = 1;
				z = 1;
			}
		}
		clipModelInfo = {
			clipModelName = "";
			type = "CLIPMODEL_CYLINDER";
            size = {
                x = 1;
                y = 1;
                z = 1;
            }
		}
		targets = { // list of entities to be triggered
			num = 1;
			item[0] = "mod_target_1";
		}
		wait = 0; // Seconds to wait before this idTrigger can be retriggered.
		waitDelta = 0; // Additional seconds added to the wait value with each trigger. This is cumulative.
		waitMin = 0; // Minimum seconds the wait period can become if using waitDelta.
		waitMax = 0; // Maximum seconds the wait period can become if using waitDelta.
		delay = 0; // Delay, in seconds, between activating this idTrigger and when it activates its targets.
		triggerOnce = true; // If true, will only trigger its targets once.
		triggerFirst = true; // If true, this entity must be activate before it can be used.
		triggerOnEnter = true; // If true, it will only activate its targets when entering the trigger.
		triggerOnExit = false; // If true, it will only activate its targets when exiting the trigger.
		aiCanActivate = false; // If true, ai can activate this idTrigger.
		demonPlayerCanActivate = false; // If true, any demon players can activate.
		clientCanActivate = false; // If true, can be activated on client.
	}
}
}

The spawnPosition and clipModelInfo determine the physical location that the player has to walk into to activate the idTrigger. Alternatively, the idTrigger can also be activated by another entity or eventCall.