Skip to main content

idInteractable

An entity that is interactable with a melee input.

Skull Switch

entity {
	entityDef interact_use_panel_sentinel_skull_switch_1 {
	inherit = "interact/use_panel/sentinel_skull_switch";
	class = "idInteractable";
	expandInheritance = false;
	poolCount = 0;
	poolGranularity = 2;
	networkReplicated = true;
	disableAIPooling = false;
	edit = {
		whenToSave = "SGT_CHECKPOINT";
		clipModelInfo = {
			type = "CLIPMODEL_BOX";
			size = {
				x = 0.75;
				y = 1.20000005;
				z = 1.95000005;
			}
		}
		interaction = {
			initalState = "interactables/console/sentinel_skull_switch/sentinel_skull_idle";
			interactionGraph = "interactables/console";
			stateData = {
				num = 6;
				item[0] = {
					stateName = "interactables/console/sentinel_skull_switch/sentinel_skull_activate";
				}
				item[1] = {
					stateName = "interactables/console/sentinel_skull_switch/sentinel_skull_activate_repeat";
				}
				item[2] = {
					stateName = "interactables/console/sentinel_skull_switch/sentinel_skull_idle";
				}
				item[3] = {
					stateName = "interactables/console/sentinel_skull_switch/sentinel_skull_idle_repeat";
				}
				item[4] = {
					stateName = "interactables/console/sentinel_skull_switch/sentinel_skull_used";
				}
				item[5] = {
					stateName = "interactables/console/sentinel_skull_switch/sentinel_skull_used_repeat";
				}
			}
			transitionData = {
				num = 6;
				item[0] = {
					transitionName = "sentinel_skull_activate_To_sentinel_skull_idle";
					additionalWaitMs = 250;
				}
				item[1] = {
					transitionName = "sentinel_skull_activate_repeat_To_sentinel_skull_idle_repeat";
					additionalWaitMs = 250;
				}
				item[2] = {
					transitionName = "sentinel_skull_usable_To_sentinel_skull_used";
				}
				item[3] = {
					transitionName = "sentinel_skull_usable_repeat_To_sentinel_skull_used_repeat";
				}
				item[4] = {
					transitionName = "sentinel_skull_used_To_sentinel_skull_idle";
					additionalWaitMs = 250;
				}
				item[5] = {
					transitionName = "sentinel_skull_used_repeat_To_sentinel_skull_idle_repeat";
					additionalWaitMs = 2000;
				}
			}
			animWebDecl = "animweb/interact/skull_switch_sentinel/skull_switch_sentinel_interact";
		}
		touchData = {
			triggerDef = "trigger/interact/use_panel";
		}
		activateTargetsOnUse = false;
		stateColors = {
			num = 6;
			item[0] = {
				color = {
					g = 0.0588235036;
					b = 0.0588235036;
				}
				colorScale = 5;
				state = "sentinel_skull_activate";
			}
			item[1] = {
				color = {
					g = 0.0588235036;
					b = 0.0588235036;
				}
				colorScale = 5;
				state = "sentinel_skull_activate_repeat";
			}
			item[2] = {
				color = {
					r = 0.196078002;
					b = 0.0392156988;
				}
				colorScale = 5;
				state = "sentinel_skull_idle";
			}
			item[3] = {
				color = {
					r = 0.196078002;
					b = 0.0392156988;
				}
				colorScale = 5;
				state = "sentinel_skull_idle_repeat";
			}
			item[4] = {
				color = {
					r = 0;
					g = 0;
					b = 0;
				}
				colorScale = 0;
				state = "sentinel_skull_used";
			}
			item[5] = {
				color = {
					g = 0.0588235036;
					b = 0.0588235036;
				}
				colorScale = 5;
				state = "sentinel_skull_used_repeat";
			}
		}
		activateTargetsOnEndInteraction = true;
		thirdPersonInteractionData = {
			thirdPersonInteractionType = "PLAYER_MECHANIC_THIRD_PERSON_INTERACT_TYPE_BUTTON";
		}
		renderModelInfo = {
			model = "md6def/objects/interact/skull_switch_sentinel/skull_switch_sentinel.md6";
		}
		spawnPosition = {
			x = 1;
			y = 1;
			z = 1;
		}
		spawnOrientation = {
			mat = {
				mat[0] = {
					x = 0;
					y = 1;
				}
				mat[1] = {
					x = -1;
					y = 0;
				}
			}
		}
		targets = { // activates these entities on interact
			num = 1;
			item[0] = "activate_something_1";
		}
	}
}
}