Skip to main content

idDynamicEntity

An entity that consists of various objects not connected to the level geometry.

Usage

entity {
	entityDef example_func_dynamic {
	inherit = "func/dynamic";
	class = "idDynamicEntity";
	expandInheritance = false;
	poolCount = 0;
	poolGranularity = 2;
	networkReplicated = false;
	disableAIPooling = false;
	edit = {
		spawnPosition = { // Be sure to set its spawn position
			x = 1;
			y = 1;
			z = 1;
		}
		spawnOrientation = { // Be sure to set its rotation
			mat = {
				mat[0] = {
					x = 1;
					y = 0;
				}
				mat[1] = {
					x = 0;
					y = 1;
				}
			}
		}
		flags = {
			hide = false; // Set to true to hide the object
		}
		renderModelInfo = { // The visible model
			model = ""; // If set to NULL, then the object will be invisible
		}
		clipModelInfo = { // The physical dimensions
			clipModelName = ""; // If set to NULL, then you can move right through the object 
		}
	}
}
}

Example

This is an example of an energy barrier that would commonly be used to lock the player in an arena.

entity {
	entityDef example_energy_barrier {
	inherit = "func/dynamic";
	class = "idDynamicEntity";
	expandInheritance = false;
	poolCount = 0;
	poolGranularity = 2;
	networkReplicated = false;
	disableAIPooling = false;
	edit = {
		spawnPosition = { // Be sure to set its spawn position
			x = 1;
			y = 1;
			z = 1;
		}
		spawnOrientation = { // Be sure to set its rotation
			mat = {
				mat[0] = {
					x = 1;
					y = 0;
				}
				mat[1] = {
					x = 0;
					y = 1;
				}
			}
		}
		flags = {
			hide = false;
		}
		renderModelInfo = {
			model = "art/gameplay/gameplay_energyBarrier_a.lwo";
			scale = {
				x = 1.2;
				y = 1.2;
				z = 1.2;
			}
		}
		clipModelInfo = {
			clipModelName = "art/gameplay/gameplay_energyBarrier_b.lwo";
		}
	}
}
}

Simply activating the entity can toggle its hide flag.

See Also

activateTarget

idTarget_Count (Relays)