From Valve Developer Community
Revision as of 14:30, 4 April 2021 by Wolfcl0ck (talk | contribs) (added bug info on the turret.)
Jump to: navigation, search

Portal 2 npc_hover_turret is a point entity available in Portal 2 .

Entity description

The Hover Turret is an enemy cut from Portal 2. It was supposed to look like the 4 cores from Portal 1, but has no in-game model. The coded model name is "models/npcs/hover_turret.mdl".

The Hover Turret will fire a laser similar to the thermal discouragement beam at the player if it sees them. When searching for the player, it will glow blue, whereas when firing at the player, it will glow yellow. If the turret has a model with physics applied to it, it will also glow purple when being held, and will glow red on occasion when bumped into.

Bug.png Bug: The turret's laser will only render when it is in its neutral or searching modes, meaning it will not render when firing at the player.

Adding the hover turret to the game: See here for a fixed model, or here for an older release.

{{bug|Currently, the fixed model has the turret facing the wrong direction when in its neutral state. It is also unable to aim downwards.]]

FGD Code

@PointClass base(Parentname, Targetname, Angles) studio( "models/npc/hover_turret.mdl" ) = npc_hover_turret: "Hover Turret."
	attachTarget(string) : "attachTarget" : "" : "The attach Target"
	// Inputs
	input InteractivePowerDown(void)
	input CreateAddon(string)
	input UpdateEnemyMemory(string)
	input ForceInteractionWithNPC(string)
	input UnholsterWeapon(void)
	input HolsterAndDestroyWeapon(void)
	input HolsterWeapon(void)
	input SetSpeedModSpeed(integer)
	input SetSpeedModRadius(integer)
	input DisableSpeedModifier(void)
	input ActivateSpeedModifier(void)
	input OutsideTransition(void)
	input InsideTransition(void)
	input GagDisable(void)
	input GagEnable(void)
	input StopScripting(void)
	input StartScripting(void)
	input Break(void)
	input IgnoreDangerSounds(float)
	input ForgetEntity(string)
	input Wake(void)
	input SetSquad(string)
	input BeginRappel(void)
	input SetHealth(integer)
	input SetEnemyFilter(string)
	input SetRelationship(string)
	input KilledNPC(void)
	input physdamagescale(float)
	input SetLightingOrigin(string)
	input SetLightingOriginHack(string)
	input BecomeRagdoll(void)
	input IgniteHitboxFireScale(float)
	input IgniteNumHitboxFires(integer)
	input IgniteLifetime(float)
	input Ignite(void)
	input SetBodyGroup(integer)
	input skin(integer)
	input RemovePaint(void)
	input CallScriptFunction(string)
	input RunScriptCode(string)
	input RunScriptFile(string)
	input FireUser4(string)
	input FireUser3(string)
	input FireUser2(string)
	input FireUser1(string)
	input AddOutput(string)
	input EnableDrawInFastReflection(void)
	input DisableDrawInFastReflection(void)
	input EnableReceivingFlashlight(void)
	input DisableReceivingFlashlight(void)
	input EnableDraw(void)
	input DisableDraw(void)
	input EnableShadow(void)
	input DisableShadow(void)
	input ClearContext(string)
	input RemoveContext(string)
	input AddContext(string)
	input DispatchResponse(string)
	input DisableDamageForces(void)
	input EnableDamageForces(void)
	input SetDamageFilter(string)
	input SetLocalAngles(string)
	input SetLocalOrigin(string)
	input ClearParent(void)
	input SetParentAttachmentMaintainOffset(string)
	input SetParentAttachment(string)
	input SetParent(string) : "Changes the entity's parent in the movement hierarchy."
	input AlternativeSorting(boolean)
	input Alpha(integer)
	input Use(void)
	input KillHierarchy(void)
	input Kill(void)
	input fademaxdist(float)
	input fademindist(float)
	input SetTeam(integer)
	input TeamNum(integer)
	// Outputs
	output OnAlyxFinishedInteraction(void)
	output OnAlyxStartedInteraction(void)
	output OnPhysGunDrop(void)
	output OnPhysGunPickup(void)
	output OnForcedInteractionFinished(void)
	output OnForcedInteractionAborted(void)
	output OnForcedInteractionStarted(void)
	output OnSleep(void)
	output OnWake(void)
	output OnRappelTouchdown(void)
	output OnDenyCommanderUse(void)
	output OnDamagedByPlayerSquad(void)
	output OnDamagedByPlayer(void)
	output OnHearCombat(void)
	output OnHearPlayer(void)
	output OnHearWorld(void)
	output OnLostPlayer(void)
	output OnLostPlayerLOS(void)
	output OnFoundPlayer(void)
	output OnLostEnemy(void)
	output OnLostEnemyLOS(void)
	output OnFoundEnemy(void)
	output OnHalfHealth(void)
	output OnDeath(void)		:	"Fired after this turret finishes it's destroy think and begins it's death think."
	output OnDamaged(void)
	output OnFizzled(void)
	output OnIgnite(void)
	output OnUser4(void)
	output OnUser3(void)
	output OnUser2(void)
	output OnUser1(void)

The hover turret's full (unfinished and, therefor, broken) FGD data can be found here. To do: Finish the Turret's FGD entry

See also