Skip to main content

idTrigger

An entity that will trigger its listed targets when used.

2016

entity {
	entityDef example_trigger_2016 {
	inherit = "triggers/trigger";
	class = "idTrigger";
	expandInheritance = false;
	poolCount = 0;
	poolGranularity = 2;
	edit = {
		saveTriggerState = true; // Whether to save the trigger state upon checkpoint (?)
		spawnPosition = {
			x = 1110;
			y = 12448;
			z = 164;
		}
		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.
		targets = { // list of entities to be triggered
			num = 1;
			item[0] = "example_relay_entity";
		}
		renderModelInfo = {
			model = NULL;
		}
		clipModelInfo = {
			clipModelName = "";
			type = "CLIPMODEL_CYLINDER";
            size = {
                x = 100;
                y = 100;
                z = 100;
            }
		}
	}
}
}

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.