Template:I BaseVehiclePassengerNPC

From Valve Developer Community
Revision as of 17:29, 23 January 2020 by Deprecated (talk | contribs) (Added to Input Templates Category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

BaseVehiclePassengerNPC:

SetTargetVehicle <string>
Change the target vehicle of this NPC.
EnterVehicle <integer>
Tell this NPC to run and get in a role in their target vehicle.
EnterVehicleForce <integer>
Force this NPC to get in a role in their target vehicle.
ExitVehicle
Tell this NPC to get out of their target vehicle.
DriverSetTargetPathCorner <string>
Set the path corner the driver will use for pathing.
DriverSetMaxSpeed <float>
Set the Maxspeed (percentage of vehicle's maxspeed) (only used if NPC is in driver role) (0 - 1).
DriverSetMinSpeed <float>
Set the Minspeed (percentage of vehicle's maxspeed) (only used if NPC is in driver role) (0 - 1).
DriverStartDriving
Tell the driver to start driving (must be in driver role of vehicle).
DriverStopDriving
Tell the driver to stop driving (must be in driver role of vehicle).
DriverGotoPathCorner <string>
Tell the driver to go to a specific path corner and continue from there (must be in driver role of vehicle).
DriverStartBoost
Tell the driver to apply his boost (must be in driver role of vehicle).
DriverStopBoost
Tell the driver to stop applying his boost (must be in driver role of vehicle).
DriverLock
Disables the drivers ability to turn and brake.
DriverUnlock
Enables the drivers ability to turn and brake.

BaseNPC:

SetRelationship <string|targetname or classname> <string|disposition> <int|rank>
Changes whether this NPC likes or dislikes certain others. Used like the ai_relationship entity, with this NPC as the subject.
Values for disposition are:
  • D_HT: Hate
  • D_FR: Fear
  • D_LI: Like
  • D_NU: Neutral
SetHealth <integer>
Set the NPC's health.
AddHealth <integer> (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
RemoveHealth <integer> (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
Add to or remove from the NPC's health.
SetBodyGroup <integer>
HACK: Sets this NPC's body group (from 0 - n).
physdamagescale <float>
Scales the damage taken when this character is hit by a physics object. 0 means this feature is disabled for backwards compatibility.
Ignite
Burst into flames.
IgniteLifetime <float>
Ignite for the given number of seconds.
IgniteNumHitboxFires <integer>
Ignite with the given number of hitbox fires.
IgniteHitboxFireScale <float>
Ignite with the given hitbox fire scale.
Break
Smash into pieces. If this is not possible, disappear.
BecomeRagdoll  (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
Remove itself and instantly become a ragdoll with zero force (just go limp). OnDeath, etc. Outputs will NOT be fired.
StartScripting
StopScripting
Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore +USE, don't idle speak or respond to other NPC's idle speech, and so on.
Assault <targetname>
Start an assault at the given rally point.
SetSquad <string>
Change the name of this NPC's squad. Leaving the parameter blank will remove the NPC from any existing squad.
Wake
Wakes up the NPC if it is sleeping.
ForgetEntity <targetname>
Clears out the NPC's knowledge of a named entity.
GagEnable
GagDisable
Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene.
IgnoreDangerSounds <float>
Ignore danger sounds for the specified number of seconds.
HolsterWeapon  (in all games since <Half-Life 2: Episode One><Half-Life 2: Episode One>)
UnholsterWeapon  (in all games since <Half-Life 2: Episode One><Half-Life 2: Episode One>)
Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons.
HolsterAndDestroyWeapon  (in all games since <Half-Life 2: Episode One><Half-Life 2: Episode One>)
Same as HolsterWeapon, except the weapon is destroyed once it has been concealed.
ForceInteractionWithNPC <string> <string>  (in all games since <Half-Life 2: Episode One><Half-Life 2: Episode One>)
Force the NPC to use a dynamic interaction with another NPC. Syntax is <targetname> <dynamic interaction>
UpdateEnemyMemory  (in all games since <Half-Life 2: Episode One><Half-Life 2: Episode One>)
Update (or create) this NPC's memory of of the given entity.
SetMaxLookDistance <float> (only in <Garry's Mod>)
Sets the maximum look distance for the NPC. Defaults are 2048 and 6000 for long range NPCs.

RenderFields:

Alpha <integer>
Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its Render Mode (rendermode) set to a number other than 0.
Color <color255>
Sets an RGB color for the entity.

DamageFilter:

SetDamageFilter <string>
Sets the entity to use as damage filter. Pass in an empty string (no parameter) to clear the damage filter.

ResponseContext:

AddContext <string>
Adds to the entity's list of response contexts. Format is <key>:<value>.
RemoveContext <string>
Remove a context from this entity's list. The name should match the key of an existing context.
ClearContext
Removes all contexts from this entity's list.

Shadow:

DisableShadow
Turn dynamic shadows off for this entity.
EnableShadow
Turn dynamic shadows on for this entity.
DisableReceivingFlashlight  (in all games since [Portal 2])
This object will not receive light or shadows from projected textures.
EnableReceivingFlashlight  (in all games since [Portal 2])
This object may receive light or shadows from projected textures.

Targetname:

Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and its children from the world.
Note.png Note: Entities already remove orphaned children upon being removed, but this input removes all children on the same frame, being marginally faster than Kill.
AddOutput <string>
Adds a keyvalue/output to this entity. It can be potentially very dangerous, use with care.
KV Format: <key> <value>
I/O Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything depending on the entity. Can also be invoked by firing an output that does not specify an input.
RunScriptFile <script> (in all games since <Left 4 Dead 2>)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <string> (in all games since <Left 4 Dead 2>)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug.png Bug: In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning.png Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction <string> (in all games since <Left 4 Dead 2>) !FGD
Execute a VScript function in the scope of the receiving entity.
SetLocalOrigin <coordinates> (in all games since <Alien Swarm>) !FGD
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles <angles> (in all games since <Alien Swarm>) !FGD
Set this entity's angles.