Npc vehicledriver: Difference between revisions
Jump to navigation
Jump to search
Note:Some keyvalues, spawnflags, effect flags, inputs, or outputs might not affect an NPC, based on the functionality and coding of the NPC.
m (Robot: fixing template case.) |
m (Classifying as model entity) |
||
(18 intermediate revisions by 11 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Ent not in fgd}} | ||
[[File:Roller.jpg|thumb|right|300px|link=|While not rendered in-game, the FGD specifies <code>roller.mdl</code> to visualize this entity in-editor.]] | |||
{{CD|CNPC_VehicleDriver|base=CAI_BaseNPC|file1=npc_vehicledriver.cpp}} | |||
{{this is a|model entity|name=npc_vehicledriver|except=Left 4 Dead series}} | |||
==Entity description== | |||
[[File:npc_vehicledriver.png|left|link=]] | |||
The NPC used to drive a target vehicle. | |||
{{immobile npc}} | {{immobile npc}} | ||
* For an example, see the [[apc_on_path]] prefab. | * For an example, see the [[apc_on_path]] prefab. | ||
{{ | {{NPCNote}} | ||
{{ | == Keyvalues == | ||
{{KV VehicleDriverNPC}} | |||
{{KV|Maxspeed (percentage of vehicle's maxspeed)|intn=drivermaxspeed|float|Maxspeed (percentage of vehicle's maxspeed).}} | |||
{{KV|MinSpeed (percentage of vehicle's maxspeed)|intn=driverminspeed|float|MinSpeed (percentage of vehicle's maxspeed).}} | |||
== Flags == | == Flags == | ||
{{Fl VehicleDriverNPC}} | |||
== Inputs == | == Inputs == | ||
{{I VehicleDriverNPC}} | |||
{{I|SetDriversMaxSpeed|Set the drivermaxspeed.|param=float}} | |||
{{I|SetDriversMinSpeed|Set the driverminspeed.|param=float}} | |||
{{I|StartForward|Tell the driver to start driving.|}} | |||
{{I|Stop|Tell the driver to stop driving.|}} | |||
== Outputs == | == Outputs == | ||
{{O BaseNPC}} | |||
[[Category:Vehicle Entities]] | [[Category:Vehicle Entities]] | ||
[[Category:NPCs]] | [[Category:Half-Life 2 NPCs|V]] | ||
== See also == | |||
*[[npc_apcdriver]] - derives from <code>npc_vehicledriver</code>, used to drive [[prop_vehicle_apc|Combine APCs]] and fire from them. | |||
*[[npc_cranedriver]] - used by NPC-operated [[prop_vehicle_crane|cranes]], such as the one in [[Highway 17]]. |
Latest revision as of 04:33, 19 May 2025
![]() |
---|
CNPC_VehicleDriver |
![]() |
npc_vehicledriver
is a model entity available in all Source games except
Left 4 Dead series.
Entity description

The NPC used to drive a target vehicle.
- For an example, see the apc_on_path prefab.

Keyvalues
- Vehicle (vehicle) <targetname>
- Vehicle to drive.
- Maxspeed (percentage of vehicle's maxspeed) (drivermaxspeed) <float>
- Maxspeed (percentage of vehicle's maxspeed).
- MinSpeed (percentage of vehicle's maxspeed) (driverminspeed) <float>
- MinSpeed (percentage of vehicle's maxspeed).
Flags
- Start Inactive : [65536]
Inputs
- StartFiring
- Tell the driver to attack nearby enemies with the vehicle's weaponry (if any).
- StopFiring
- Tell the driver to stop attacking nearby enemies with the vehicle's weaponry.
- GotoPathCorner <targetname >
- Tell the driver to go to a specific path corner and continue from there.
- SetDriversMaxSpeed <float >
- Set the drivermaxspeed.
- SetDriversMinSpeed <float >
- Set the driverminspeed.
- StartForward
- Tell the driver to start driving.
- Stop
- Tell the driver to stop driving.
Outputs
|
See also
- npc_apcdriver - derives from
npc_vehicledriver
, used to drive Combine APCs and fire from them. - npc_cranedriver - used by NPC-operated cranes, such as the one in Highway 17.