Template:KV BaseVehicle: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(35 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{{kv targetname}}
{{minititle|BaseVehicle}}
* {{kv origin}}
{{KV|Vehicle Script File|intn=vehiclescript|string|The vehicle script files contained in <code>scripts\vehicles\</code> define the behaviour and handling of a vehicle. It is important to match the right script to the right entity/model:}}
* {{kv global}}
:* {{ent|prop_vehicle_airboat}}: <code>airboat.txt</code>
* {{kv angles}}
:* {{ent|prop_vehicle_apc}}: <code>apc.txt</code> / <code>apc_npc.txt </code>
* {{kv dxlevelchoice}}
:* {{ent|prop_vehicle_crane}}: <code>crane.txt</code>
* {{kv studiomodel}}
:* {{ent|prop_vehicle_prisoner_pod}}: <code>prisoner_pod.txt</code>
* '''solid'''
:* {{ent|prop_vehicle_jeep}}: <code>jalopy.txt</code> {{only|{{ep2}}}} / <code>jeep_test.txt</code>
: <choices> Collisions - using other values may give undesired results
:* {{ent|prop_vehicle_choreo_generic}}:
:{|
:** {{hl2ep1|2.bold}} only<nowiki>:</nowiki>
! Literal Value || Description
:** <code>choreo_vehicle.txt</code>
|-
:** <code>choreo_vehicle_ep1_dogintro.txt</code>
| 0 || Not Solid
:** {{hl2ep2|2.bold}} only<nowiki>:</nowiki>
|-
:** <code>choreo_vehicle_ep2_barn1.txt</code>
| 2 || Use Bounding Box
:** <code>choreo_vehicle_ep2_hangar.txt</code>
|-
:** <code>choreo_vehicle_ep2_intro.txt</code>
| 6 || Use VPhysics
:** <code>choreo_vehicle_ep2_Outland_02.txt</code>
|}
:** <code>choreo_vehicle_ep2_playertrapped.txt</code> {{#if: {{{all|}}} |
* '''disableshadows'''
:** {{p2|2.bold}} only<nowiki>:</nowiki>
: {{boolean}}
:** <code>player_ending.txt</code>
* '''screenspacefade'''
:** <code>player_down.txt</code>
: {{boolean}} The method by which the fading distance should be determined. If off, the fade distances is the distance from the player's view to the object, in inches. If on, the fade distance is the size of the object onscreen, in pixels.
:** <code>br_player_look.txt</code>
* '''fademindist'''
:** <code>br_player_view.txt</code> }}
: <float> Distance at which the prop starts to fade (-1 = use fademaxdist). If 'Screen Space Fade' is selected, this represents the number of pixels wide covered by the prop when it starts to fade.
:* There is also <code>reference_vehicle.txt</code>, which you can modify to make your own vehicle or use as-is.
* '''fademaxdist'''
:* {{ent|prop_vehicle_sin}}: <code>sincar.txt</code> / <code>sincar_pit.txt</code> {{only|{{sineps}}}}
: <float> Maximum distance at which the prop is visible (0 = don't fade out). If 'Screen Space Fade' is selected, this represents the *minimum* number of pixels wide covered by the prop when it fades.
:* {{ent|p3_vehicle_segway}}: <code>segway.txt</code> {{only|{{p3}}}}
* '''fadescale'''
{{KV|Scale of action input / framerate|intn=actionScale|float|{{todo|How fast the vehicle turns/accelerates?}}}}
: <float> If you specify a fade in the worldspawn, or if the engine is running under dx7, then the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified. This scale factor gives you some control over the fade. Using 0 here turns off the forcible fades. Numbers smaller than 1 cause the prop to fade out at further distances, and greater than 1 cause it to fade out at closer distances.
[[Category:Vehicle Entities]]
* '''lightingorigin'''
<noinclude>[[Category:Keyvalue Templates|BaseVehicle]]</noinclude>
: <target_destination> Select an info_lighting to specify a location to sample lighting from, instead of using this entity's origin.
* '''vehiclescript'''
: <string> Vehicle Script File
:{|
! Literal Value || Description || Comment
|-
| "scripts/vehicles/airboat.txt" || Airboat || Use [[prop_vehicle_airboat]]
|-
| "scripts/vehicles/apc.txt" || APC || Use [[prop_vehicle_apc]]
|-
| "scripts/vehicles/apc_npc.txt" || NPC Driven APC || Use [[prop_vehicle_apc]]
|-
| "scripts/vehicles/crane.txt" || Crane || Use [[prop_vehicle_crane]]
|-
| "scripts/vehicles/digger.txt" || --- ||
|-
| "scripts/vehicles/driveway.txt" || --- ||
|-
| "scripts/vehicles/fastdigger.txt" || --- ||
|-
| "scripts/vehicles/jetski.txt" || Jet Ski ||
|-
| "scripts/vehicles/prisoner_pod.txt" || Combine Prisoner Transportation Pod || Use [[prop_vehicle_pod]]
|-
| "scripts/vehicles/reference_vehicle.txt" || Modify this to make your own vehicle, or use it alone! ||
|-
| "scripts/vehicles/jeep_test.txt" || Jeep || Use [[prop_vehicle_jeep]]
|}
* '''actionScale'''
: <float> Scale of action input / framerate

Latest revision as of 21:42, 17 September 2024

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?