Skip to main content

idTrigger_TakeDamage & idTarget_Melee

An either shootable or punchable trigger activated when it takes damage.

Assets for both of these types of entities will not be present in all levels. You may need to use assetsinfo to import a level that does, if you wish to use them in levels that originally did not have one.

Generic crosshair-shaped shootable trigger.

entity {
	entityDef example_shootable {
	inherit = "func/shootable";
	class = "idTrigger_TakeDamage";
	expandInheritance = false;
	poolCount = 0;
	poolGranularity = 2;
	networkReplicated = false;
	disableAIPooling = false;
	edit = {
		renderModelInfo = {
			model = "art/kit/gameplay/breakable_glow_b.lwo";
			scale = {
				x = 0.528155386;
				y = 0.528155386;
				z = 0.528155386;
			}
		}
		clipModelInfo = {
			type = "CLIPMODEL_BOX";
			size = {
				x = 3.5;
				y = 2;
				z = 3.5;
			}
			offset = {
				z = -0.899999976;
			}
		}
		wait = 0;
		triggerOnce = true;
		triggerForAllClients = true;
		playerCanActivate = false;
		deadAiCanActivate = false;
		allowZeroDamage = true;
		soundActivated = "play_shootable_activate";
		soundReady = "play_shootable_reset";
		fxDecl = "gameplay/shootable";
		weaponDamageType = "PLAYER_WEAPON_SHOTGUN_ PLAYER_WEAPON_SHOTGUN_FULL_AUTO_ PLAYER_WEAPON_SHOTGUN_FULL_AUTO_MASTERY_ PLAYER_WEAPON_SHOTGUN_STICKY_BOMB_ PLAYER_WEAPON_DOUBLE_BARRELED_SHOTGUN_ PLAYER_WEAPON_PLASMA_ PLAYER_WEAPON_PLASMA_HEATWAVE_ PLAYER_WEAPON_PLASMA_SUPERCHARGE_ PLAYER_WEAPON_PLASMA_ICE_BOMB_ PLAYER_WEAPON_HAR_ PLAYER_WEAPON_HAR_SCOPE_ PLAYER_WEAPON_HAR_MICROMISSLE_ PLAYER_WEAPON_ROCKETLAUNCHER_ PLAYER_WEAPON_ROCKETLAUNCHER_DETONATE_ PLAYER_WEAPON_ROCKETLAUNCHER_LOCKON_ PLAYER_WEAPON_BALLISTA_ PLAYER_WEAPON_BALLISTA_ARBALEST_ PLAYER_WEAPON_BALLISTA_DESTROYER_ PLAYER_WEAPON_CHAINGUN_ PLAYER_WEAPON_CHAINGUN_TURRET_ PLAYER_WEAPON_CHAINGUN_GATLING_ PLAYER_WEAPON_MEAT_HOOK_NAPALM_ PLAYER_WEAPON_BFG_ PLAYER_WEAPON_FRAG_ PLAYER_WEAPON_FRAG_GRENADE_ PLAYER_WEAPON_FRAG_GRENADE_CLUSTER_ PLAYER_WEAPON_FLAME_BELCH_ PLAYER_WEAPON_FLAME_BELCH_NAPALM_ PLAYER_WEAPON_PISTOL_ PLAYER_WEAPON_PISTOL_HAND_CANNON_ PLAYER_WEAPON_UNMAYKR_ PLAYER_WEAPON_MICROWAVE_MOD_";
		spawnPosition = {
			x = 69.040596;
			y = 231.581207;
			z = -79.0406036;
		}
		spawnOrientation = {
			mat = {
				mat[0] = {
					x = 0;
					y = 0;
					z = 0;
				}
				mat[1] = {
					x = 0;
					y = 0;
					z = 0;
				}
				mat[2] = {
					x = 0;
					y = 0;
					z = 0;
				}
			}
		}
		targets = {
			num = 1;
			item[0] = "some_movable_gate";
		}
		dormancy = {
			allowDormancy = false;
			allowPvsDormancy = false;
		}
		keepAfterTriggerOnce = true;
	}
}
}

Cultist-themed shootable.

entity {
	entityDef example_cultist_base_shootable {
	inherit = "func/shootable";
	class = "idTrigger_TakeDamage";
	expandInheritance = false;
	poolCount = 0;
	poolGranularity = 2;
	networkReplicated = false;
	disableAIPooling = false;
	edit = {
		renderModelInfo = {
			model = "art/kit/cultist/prop/shootable_a.lwo";
			color = {
				r = 0.282353014;
				b = 0;
			}
			colorScale = 3;
			emissiveColor = {
				r = 0.282353014;
				b = 0;
			}
			emissiveScale = 2;
		}
		clipModelInfo = {
			type = "CLIPMODEL_BOX";
			size = {
				x = 2.75;
				y = 1;
				z = 2.75;
			}
			offset = {
				z = -1.35000002;
			}
		}
		wait = 4;
		triggerOnce = true;
		triggerForAllClients = true;
		playerCanActivate = false;
		deadAiCanActivate = false;
		allowZeroDamage = true;
		soundActivated = "play_shootable_activate";
		soundReady = "play_shootable_reset";
		fxDecl = "gameplay/shootable";
		weaponDamageType = "PLAYER_WEAPON_SHOTGUN_ PLAYER_WEAPON_SHOTGUN_FULL_AUTO_ PLAYER_WEAPON_SHOTGUN_FULL_AUTO_MASTERY_ PLAYER_WEAPON_SHOTGUN_STICKY_BOMB_ PLAYER_WEAPON_DOUBLE_BARRELED_SHOTGUN_ PLAYER_WEAPON_PLASMA_ PLAYER_WEAPON_PLASMA_HEATWAVE_ PLAYER_WEAPON_PLASMA_SUPERCHARGE_ PLAYER_WEAPON_PLASMA_ICE_BOMB_ PLAYER_WEAPON_HAR_ PLAYER_WEAPON_HAR_SCOPE_ PLAYER_WEAPON_HAR_MICROMISSLE_ PLAYER_WEAPON_ROCKETLAUNCHER_ PLAYER_WEAPON_ROCKETLAUNCHER_DETONATE_ PLAYER_WEAPON_ROCKETLAUNCHER_LOCKON_ PLAYER_WEAPON_BALLISTA_ PLAYER_WEAPON_BALLISTA_ARBALEST_ PLAYER_WEAPON_BALLISTA_DESTROYER_ PLAYER_WEAPON_CHAINGUN_ PLAYER_WEAPON_CHAINGUN_TURRET_ PLAYER_WEAPON_CHAINGUN_GATLING_ PLAYER_WEAPON_MEAT_HOOK_NAPALM_ PLAYER_WEAPON_BFG_ PLAYER_WEAPON_FRAG_ PLAYER_WEAPON_FRAG_GRENADE_ PLAYER_WEAPON_FRAG_GRENADE_CLUSTER_ PLAYER_WEAPON_FLAME_BELCH_ PLAYER_WEAPON_FLAME_BELCH_NAPALM_ PLAYER_WEAPON_PISTOL_ PLAYER_WEAPON_PISTOL_HAND_CANNON_ PLAYER_WEAPON_UNMAYKR_ PLAYER_WEAPON_MICROWAVE_MOD_";
		spawnPosition = {
			y = 1;
			y = 146.950027;
			z = 6.25000095;
		}
		spawnOrientation = {
			mat = {
				mat[0] = {
					x = 0;
					y = 0;
					z = 0;
				}
				mat[1] = {
					x = 0;
					y = 0;
					z = 0;
				}
				mat[2] = {
					x = 0;
					y = 0;
					z = 0;
				}
			}
		}
		targets = {
			num = 1;
			item[0] = "example_relay";
		}
		keepAfterTriggerOnce = true;
	}
}
}

Cultist punchable

entity {
	entityDef example_target_melee {
	inherit = "target/melee";
	class = "idTarget_Melee";
	expandInheritance = false;
	poolCount = 0;
	poolGranularity = 2;
	networkReplicated = true;
	disableAIPooling = false;
	edit = {
		flags = {
			noFlood = true;
		}
		takesDamageFromDamageTypes = "DAMAGETYPE_DASH";
		targetingDecl = "target_melee";
		spawnPosition = {
			x = 1;
		}
		renderModelInfo = {
			model = "art/kit/cultist/prop/punch_symbol.lwo";
			scale = {
				x = 0.984000;
				y = 0.984000;
				z = 0.984000;
			}
			emissiveScale = 6;
			customLodDistance1 = 50;
			customLodDistance2 = 100;
			customLodDistance3 = 125;
		}
		clipModelInfo = {
			type = "CLIPMODEL_BOX";
			contentsFilter = {
				playerClip = false;
			}
			size = {
				x = 2.20000005;
				y = 0.300000012;
				z = 2.20000005;
			}
			offset = {
				y = -0.300000012;
				z = -1.20000005;
			}
			clipModelName = "art/kit/gameplay/breakable_glow_a.lwo";
		}
		bindInfo = {
			bindParent = "game_punch_block_1847259846";
			bindOriented = true;
		}
		dormancy = {
			allowPvsDormancy = false;
		}
		removeOnDamage = false;
		fxDecl = "gameplay/pushable";
	}
}
}