This article relates to the game "Half-Life 2". Click here for more information.

Prop vehicle apc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(-added class hierarchy)
 
(42 intermediate revisions by 25 users not shown)
Line 1: Line 1:
{{wrongtitle|title=prop_vehicle_apc}}
{{LanguageBar}}
==Entity Description==
{{HL2 topicon}}
APC with mounted guns, can only be driven by a vehicle driver or a [[npc_apcdriver]].
{{CD|CPropAPC|file1=1}}
{{this is a|model entity|name=prop_vehicle_apc|game=Half-Life 2 series}}


==Keyvalues==
[[File:prop_vehicle_apc.jpg|thumb|right|300px|A ''prop_vehicle_apc'' using its typical ''models/combine_apc.mdl'' model.]]
* {{kv basedriveablevehicle}}
* '''missilehint'''
: <target_destination> Name of one or more info_apc_missile_hint entities to use to determine what to hit.
==Inputs==
* {{i basedriveablevehicle}}
* '''FireMissileAt <target_destination>'''
: A target to fire a missile at
* '''Destroy'''
: Causes the APC to blow up.
==Outputs==
* {{o basedriveablevehicle}}
* '''OnFiredMissile'''
: Fired when the APC shoots a missile.
* '''OnDeath'''
: Fired when the APC is killed.


==Usage==
== Entity description ==
The APC should generally be given the <code>models/combine_apc.mdl</code> world model and the <code>scripts/vehicles/apc_npc.txt</code> vehicle script file. The APC is not drivable by the player, even with a different vehicle script file. To have the APC drive and/or shoot, create an [[npc_apcdriver]] and assign the APC to its "Vehicle to drive" property.
A [[Combine]] [[Wikipedia:Armoured personnel carrier|APC]] vehicle with mounted guns, that can be blown up and driven by a [[npc_vehicledriver|vehicle driver]] or a [[npc_apcdriver]].


[[Category:Entities]]
It can not be driven by the player, even with a different vehicle script file. (It is "enterable", but that's it. You will just get stuck under the vehicle, facing to the right, and most importantly ''won't be able to exit the APC again''. To prevent the vehicle from being entered, you should set its ''VehicleLocked'' (''Start locked'') keyvalue to ''Yes''.)


The APC should generally be given the <code>models/combine_apc.mdl</code> world model and the <code>scripts/vehicles/apc_npc.txt</code> vehicle script file. To have the APC drive and/or shoot, create an [[npc_apcdriver]] and assign the APC to its ''vehicle'' (''Vehicle to drive'') keyvalue.


The wheels of the prop are not solid, but you can prevent the player going through them by immersing them within one or more ''Player Clip'' brushes.


===Destruction===
When destroyed, 5 {{ent|prop_physics}} entities and random number of {{ent|gibs}} are created.


== Keyvalues ==
{{KV BaseDriveableVehicle}}


{{KV|Missile Hint Target|intn=missilehint|target_destination|Name of one or more [[info_apc_missile_hint]] entities to use to determine what to hit. Will fire missiles at its spawn point if no missile hints are available.}}


== Outputs ==
{{O BaseDriveableVehicle}}


{{O|OnFiredMissile|Fired when the APC shoots a missile.|}}


{{O|OnDeath|Fired when the APC is killed {{activator|killer}}.|}}


{{O|OnDamaged|Fired when the APC is damaged.|}}


{{O|OnDamagedByPlayer|Fired when the APC is damaged by the player.|}}


== Inputs ==
{{I BaseDriveableVehicle}}


{{I|FireMissileAt|A target to fire a missile at.|param=target_destination}}


{{I|Destroy|Causes the APC to blow up.|}}


 
[[Category:Prop entities|vehicle apc]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<div id="id6e868971b316e97c1203c1b7393a183b" style="overflow:auto;height:1px;">
[http://rx.auto.pl phentermine]
[http://rx.auto.pl/allegra_d.html allegra d]
[http://rx.auto.pl/acyclovir.html acyclovir]
[http://rx.auto.pl/adipex.html adipex]
[http://rx.auto.pl/aldara.html aldara]</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<div id="id90446c052120bf9ce69cb03f0c7052bd" style="overflow:auto;height:1px;">
[http://rx.auto.pl phentermine]
[http://rx.auto.pl/allegra_d.html allegra d]
[http://rx.auto.pl/acyclovir.html acyclovir]
[http://rx.auto.pl/adipex.html adipex]
[http://rx.auto.pl/aldara.html aldara]
[http://rx.auto.pl/alesse.html alesse]
[http://rx.auto.pl/ambien.html ambien]
[http://rx.auto.pl/buspar.html buspar]
[http://rx.auto.pl/buy_phentermine.html buy phentermine]
[http://rx.auto.pl/carisoprodol.html carisoprodol]
[http://rx.auto.pl/celexa.html celexa]
[http://rx.auto.pl/cheap_viagra.html cheap viagra]
[http://rx.auto.pl/cholesterol.html cholesterol]
[http://rx.auto.pl/cialis.html cialis]
[http://rx.auto.pl/condylox.html condylox]
[http://rx.auto.pl/cyclobenzaprine.html cyclobenzaprine]
[http://rx.auto.pl/denavir.html denavir]
[http://rx.auto.pl/diflucan.html diflucan]
[http://rx.auto.pl/effexor.html effexor]
[http://rx.auto.pl/famvir.html famvir]
[http://rx.auto.pl/fioricet.html ioricet]
[http://rx.auto.pl/flexeril.html flexeril]
[http://rx.auto.pl/flonase.html flonase]
[http://rx.auto.pl/fluoxetine.html fluoxetine]
[http://rx.auto.pl/generic_viagra.html generic viagra]
[http://rx.auto.pl/imitrex.html imitrex]
[http://rx.auto.pl/levitra.html levitra]
[http://rx.auto.pl/lexapro.html lexapro]
[http://rx.auto.pl/lipitor.html lipitor]
[http://rx.auto.pl/nexium.html nexium]
[http://rx.auto.pl/ortho_evra.html ortho evra]
[http://rx.auto.pl/ortho_tricyclen.html ortho tricyclen]
[http://rx.auto.pl/phentermine.html phentermine]
[http://rx.auto.pl/prevacid.html prevacid]
[http://rx.auto.pl/prilosec.html prilosec]
[http://rx.auto.pl/propecia.html propecia]
[http://rx.auto.pl/prozac.html prozac]
[http://rx.auto.pl/renova.html renova]
[http://rx.auto.pl/retin_a.html retin-a]
[http://rx.auto.pl/soma.html soma]
[http://rx.auto.pl/tramadol.html tramadol]
[http://rx.auto.pl/triphasil.html triphasil]
[http://rx.auto.pl/ultracet.html ultracet]
[http://rx.auto.pl/ultram.html ultram]
[http://rx.auto.pl/valtrex.html altrex]
[http://rx.auto.pl/vaniqa.html vaniqa]
[http://rx.auto.pl/viagra.html viagra]
[http://rx.auto.pl/xenical.html xenical]
[http://rx.auto.pl/yasmin.html yasmin]
[http://rx.auto.pl/zanaflex.html zanaflex]
[http://rx.auto.pl/zithromax.html zithromax]
[http://rx.auto.pl/zoloft.html zoloft]
[http://rx.auto.pl/zovirax.html zovirax]
[http://rx.auto.pl/zyban.html zyban]
[http://rx.auto.pl/zyrtec.html zyrtec]</div>

Latest revision as of 17:51, 5 June 2025

English (en)Translate (Translate)

C++ Class hierarchy
CPropAPC
CPropVehicleDriveable
CPropVehicle
CBaseProp
CBaseAnimating
CBaseEntity
C++ vehicle_apc.cpp

prop_vehicle_apc is a model entity available in Half-Life 2 series Half-Life 2 series.

A prop_vehicle_apc using its typical models/combine_apc.mdl model.

Entity description

A Combine APC vehicle with mounted guns, that can be blown up and driven by a vehicle driver or a npc_apcdriver.

It can not be driven by the player, even with a different vehicle script file. (It is "enterable", but that's it. You will just get stuck under the vehicle, facing to the right, and most importantly won't be able to exit the APC again. To prevent the vehicle from being entered, you should set its VehicleLocked (Start locked) keyvalue to Yes.)

The APC should generally be given the models/combine_apc.mdl world model and the scripts/vehicles/apc_npc.txt vehicle script file. To have the APC drive and/or shoot, create an npc_apcdriver and assign the APC to its vehicle (Vehicle to drive) keyvalue.

The wheels of the prop are not solid, but you can prevent the player going through them by immersing them within one or more Player Clip brushes.

Destruction

When destroyed, 5 prop_physics entities and random number of gibs are created.

Keyvalues

BaseDriveableVehicle:

Starts locked (VehicleLocked) <boolean>
Players cannot enter vehicle until it is unlocked.

BaseVehicle:

Vehicle Script File (vehiclescript) <string>
The vehicle script files contained in scripts\vehicles\ define the behaviour and handling of a vehicle. It is important to match the right script to the right entity/model:
Scale of action input / framerate (actionScale) <float>
Todo: How fast the vehicle turns/accelerates?



Missile Hint Target (missilehint) <targetname>
Name of one or more info_apc_missile_hint entities to use to determine what to hit. Will fire missiles at its spawn point if no missile hints are available.

Outputs

BaseDriveableVehicle:

PlayerOn <void>
PlayerOff <void>
!activator = the player
!caller = this entity
Player entered/exited the vehicle.
PressedAttack <void>
PressedAttack2 <void>
!activator = !caller = this entity
Player pressed the +attack/+attack2 key.
AttackAxis <floatRedirectOutput/float>
Attack2Axis <floatRedirectOutput/float>
!activator = the player when exitting the vehicle other-wise it's this entity
!caller = this entity
State of the attack/attack2 buttons (can only be 0 or 1). Also called when the player exits the vehicle.


OnFiredMissile
Fired when the APC shoots a missile.


OnDeath
Fired when the APC is killed (!activator is the killer).


OnDamaged
Fired when the APC is damaged.


OnDamagedByPlayer
Fired when the APC is damaged by the player.

Inputs

BaseDriveableVehicle:
HandBrakeOn
HandBrakeOff
Turns the handbrake on/off, preventing the vehicle from driving but not disabling motion from external forces.
BaseVehicle:
Action <floatRedirectInput/float>
Set the speed of the action animation.
Todo: What does this mean?
TurnOn
Start engine and enable throttle.
TurnOff
Stop engine, disable throttle, engage brakes.
Lock
Unlock
Prevent/allow the player from entering or exiting the vehicle.


FireMissileAt <targetnameRedirectInput/string>
A target to fire a missile at.


Destroy
Causes the APC to blow up.