Making a controllable brush vehicle: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Unicodifying, replaced: [[Image: → [[File: (33), See Also → See also)
(badly moved multipage)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{LanguageBar}}
{{Cleanup}}
{{Cleanup}}


{{Stub}}
First create a brush-based model of your plane, keep it balanced so it doesn't tip over.


First create your a brush-based model of your plane, keep it balanced so it doesn't tip over.


Select it and bind it to the '''func_physbox''' entity, assign it a name. ''' plane_01''' will do fine.


Select it and bind it to the '''func_physbox''' entity, assign it a name, ''' plane_01''' will do fine.


 
You will require a seat to perch in. You should use ''' prop_vehicle_prisoner_pod''' (you could use a buggy or airboat but that would look odd), name the chair ''' plane_01_pod'''. Also make sure the pod isn't clipping into the plane's func_physboxes, if it is then make sure that the seat is not solid (it's okay if it clips into a door or other non-phys objects, but not the func_physbox).
You will require a seat to perch in. You should use the ''' prop_vehicle_prisoner_pod''' (you could use a buggy or airboat but that would look odd) name the chair ''' plane_01_pod''' Also make sure the pod isn't clipping into the planes func_physboxs - if it is then make sure it the seat is not solid. (it's ok if it clips with a door or other non-phys objects, but not the func_physbox)




Line 26: Line 26:




Now make some ''' phys_constrants''' to hold the ''' plane_01_pod''' to the '''plane_01'''.
Now make some '''phys_constraints''' to hold the '''plane_01_pod''' to '''plane_01'''.
<blockquote>[[File:Plane_01_pod_constrants.jpg|250px]]</blockquote>
<blockquote>[[File:Plane_01_pod_constrants.jpg|250px]]</blockquote>




You also might want to make a trigger system to make it easier for the player to get in the plane and one that will teleport the player out (the top or either side of the plane) when exiting, to cancel out any problems that can occur - like getting stuck within the plane's solid parts.
You also might want to make a trigger system to make it easier for the player to get in the plane, and one that will teleport the player out (the top or either side of the plane) when exiting, to cancel out any problems that can occur, like getting stuck within the plane's solid parts.




Make a ''' game_ui''' entity. Name it ''' plane_01_game_ui''' Set the outputs for the ''' plane_01_game_ui''' to the following.
Make a '''game_ui''' entity. Name it '''plane_01_game_ui''', and set the outputs to the following.
{| {{OutputsTable}}
{| {{OutputsTable}}
| [[File:Io12.png]] || AttackAxis || plane_01_logic_fly || SetValueCompare || &nbsp; || 0.00 || No
| [[File:Io12.png]] || AttackAxis || plane_01_logic_fly || SetValueCompare || &nbsp; || 0.00 || No
Line 52: Line 52:
|}
|}


Now you are going to require three '''logic_compare''' entities. One for each of the axes, pitch, yaw and roll. These will control your thrusters.


Now you are going to require three ''' logic_compare''' entities. One for each, pitch. yawn. roll. These will control your thrusters.


 
First make a '''logic_compare''' entity near the front of the plane and name it '''plane_01_logic_comparey'''. Then set the outputs to the following
First make a ''' logic_compare''' near the front of the plane and name it '''plane_01_logic_comparey'''. Then set the outputs for
''' plane_01_logic_comparey''' to this
{| {{OutputsTable}}
{| {{OutputsTable}}
| [[File:Io12.png]] || OnEqualTo || plane_01_down || Deactivate || &nbsp; || 0.00 || No
| [[File:Io12.png]] || OnEqualTo || plane_01_down || Deactivate || &nbsp; || 0.00 || No
Line 72: Line 70:
|}
|}


 
Make another '''logic_compare''' on one of the wings. Name it '''plane_01_logic_comparex''' and set the outputs to the following
Make another ''' logic_compare''' on one of the wings. Name it ''' plane_01_logic_comparex''' and set the outputs to the following
{| {{OutputsTable}}
{| {{OutputsTable}}
| [[File:Io12.png]] || OnEqualTo || plane_01_roll_counter_clockwise || Deactivate || &nbsp; || 0.00 || No
| [[File:Io12.png]] || OnEqualTo || plane_01_roll_counter_clockwise || Deactivate || &nbsp; || 0.00 || No
Line 105: Line 102:




Now you need to setup the ''' phys_thruster'''
Now you need to setup a thruster.




Place a ''' phys_thruster''' on the left end on the wing and name it '''plane_01_roll_clockwise'''. Set the parent to
Place a '''phys_thruster''' on the left end on the wing and name it '''plane_01_roll_clockwise'''. Set the parent to
''' plane_01''' set the force to 800 and set the direction of the force UP. Go into the flags and check ignore mass.
'''plane_01''', set the force to 800 and set the direction of the force to UP. Go into the flags and check 'ignore mass'.




Place a ''' phys_thruster''' on the right end on the other wing and name it '''plane_01_roll_counter_clockwise'''. Set the parent to
Place a '''phys_thruster''' on the right end on the other wing and name it '''plane_01_roll_counter_clockwise'''. Set the parent to
''' plane_01''' set the force to 800 and set the direction of the force UP. Go into the flags and check 'ignore mass'.
'''plane_01''', set the force to 800 and set the direction of the force to UP. Go into the flags and check 'ignore mass'.




Place a ''' phys_thruster''' on the front of the plane and name it '''plane_01_up'''. Set the parent to
Place a '''phys_thruster''' on the front of the plane and name it '''plane_01_up'''. Set the parent to
''' plane_01''' set the force to 800 and set the direction of the force UP. Go into the flags and check ignore mass.
'''plane_01''', set the force to 800 and set the direction of the force to UP. Go into the flags and check 'ignore mass'.




Place a ''' phys_thruster''' on the front of the plane and name it '''plane_01_down'''. Set the parent to
Place a '''phys_thruster''' on the front of the plane and name it '''plane_01_down'''. Set the parent to
''' plane_01''' set the force to 800 and set the direction of the force DOWN. Go into the flags and check ignore mass.
'''plane_01''', set the force to 800 and set the direction of the force to DOWN. Go into the flags and check 'ignore mass'.




Place a ''' phys_thruster''' at the end of the left engine and name it '''plane_01_fly1'''. Set the parent to
Place a '''phys_thruster''' at the end of the left engine and name it '''plane_01_fly1'''. Set the parent to
''' plane_01''' set the force to 2000 and set the direction of the force to "14 0 0". Go into the flags and check ignore mass.
'''plane_01''', set the force to 2000 and set the direction of the force to "14 0 0". Go into the flags and check 'ignore mass'.




Place a ''' phys_thruster''' at the end of the right engine and name it '''plane_01_fly2'''. Set the parent to
Place a '''phys_thruster''' at the end of the right engine and name it '''plane_01_fly2'''. Set the parent to
''' plane_01''' set the force to 2000 and set the direction of the force to "14 0 0". Go into the flags and check ignore mass.
'''plane_01''', set the force to 2000 and set the direction of the force to "14 0 0". Go into the flags and check 'ignore mass'.


<br>[[File:Plane_01_finished_plane.jpg|250px]]
<br>[[File:Plane_01_finished_plane.jpg|250px]]


-Rickler
--[[User:Rickler|Rickler]] 17:28, 4 Jan 2005 (EST)


You should now have a basic working plane that will probably need some adjustments here and there.
You should now have a basic working plane that will probably need some adjustments here and there.
Line 140: Line 135:
== See also ==
== See also ==
* [[Vehicles (level design)]]
* [[Vehicles (level design)]]
[[Category:Level Design]]
[[Category:Level Design]]

Latest revision as of 06:03, 14 July 2024

English (en)Translate (Translate)
Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

First create a brush-based model of your plane, keep it balanced so it doesn't tip over.


Select it and bind it to the func_physbox entity, assign it a name. plane_01 will do fine.


You will require a seat to perch in. You should use prop_vehicle_prisoner_pod (you could use a buggy or airboat but that would look odd), name the chair plane_01_pod. Also make sure the pod isn't clipping into the plane's func_physboxes, if it is then make sure that the seat is not solid (it's okay if it clips into a door or other non-phys objects, but not the func_physbox).


Next set the outputs to the plane_01_pod like so.

  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnOpen plane_01_pod ExitVehicle   0.00 No
Io12.png PlayerOff plane_01_gameui Deactivate   0.00 No
Io12.png PlayerOn plane_01_gameui Activate   0.00 No
Io11.png PlayerOn plane_01_pod Open   0.00 No
Io11.png PlayerOn plane_01_pod Unlock   0.00 No


Now make some phys_constraints to hold the plane_01_pod to plane_01.

Plane 01 pod constrants.jpg


You also might want to make a trigger system to make it easier for the player to get in the plane, and one that will teleport the player out (the top or either side of the plane) when exiting, to cancel out any problems that can occur, like getting stuck within the plane's solid parts.


Make a game_ui entity. Name it plane_01_game_ui, and set the outputs to the following.

  My Output Target Entity Target Input Parameter Delay Only Once
Io12.png AttackAxis plane_01_logic_fly SetValueCompare   0.00 No
Io12.png PlayerOff plane_01_fly2 Deactivate   0.00 No
Io11.png PlayerOff plane_01_pod Unlock   0.00 No
Io11.png PlayerOff plane_01_pod Open   0.00 No
Io11.png PlayerOff plane_01_pod ExitVehicle   0.00 No
Io12.png PlayerOff plane_01_fly1 Deactivate   0.00 No
Io12.png XAxis plane_01_logic_comparex SetValueCompare   0.00 No
Io12.png YAxis plane_01_logic_comparey SetValueCompare   0.00 No

Now you are going to require three logic_compare entities. One for each of the axes, pitch, yaw and roll. These will control your thrusters.


First make a logic_compare entity near the front of the plane and name it plane_01_logic_comparey. Then set the outputs to the following

  My Output Target Entity Target Input Parameter Delay Only Once
Io12.png OnEqualTo plane_01_down Deactivate   0.00 No
Io12.png OnEqualTo plane_01_up Deactivate   0.00 No
Io12.png OnGreaterThan plane_01_down Activate   0.00 No
Io12.png OnGreaterThan plane_01_up Deactivate   0.00 No
Io12.png OnLessThan plane_01_down Deactivate   0.00 No
Io12.png OnLessThan plane_01_up Activate   0.00 No

Make another logic_compare on one of the wings. Name it plane_01_logic_comparex and set the outputs to the following

  My Output Target Entity Target Input Parameter Delay Only Once
Io12.png OnEqualTo plane_01_roll_counter_clockwise Deactivate   0.00 No
Io12.png OnEqualTo plane_01_roll_clockwise Deactivate   0.00 No
Io12.png OnGreaterThan plane_01_roll_counter_clockwise Deactivate   0.00 No
Io12.png OnGreaterThan plane_01_roll_clockwise Activate   0.00 No
Io12.png OnLessThan plane_01_roll_counter_clockwise Activate   0.00 No
Io12.png OnLessThan plane_01_roll_clockwise Deactivate   0.00 No


Make another logic_compare near the engines. Name it plane_01_logic_fly and set the outputs to the following

  My Output Target Entity Target Input Parameter Delay Only Once
Io12.png OnEqualTo plane_01_fly2 Deactivate   0.00 No
Io12.png OnEqualTo plane_01_fly1 Deactivate   0.00 No
Io12.png OnGreaterThan plane_01_fly1 Activate   0.00 No
Io12.png OnGreaterThan plane_01_fly2 Activate   0.00 No
Io12.png OnLessThan plane_01_fly1 Deactivate   0.00 No
Io12.png OnLessThan plane_01_fly2 Deactivate   0.00 No


Now you need to setup a thruster.


Place a phys_thruster on the left end on the wing and name it plane_01_roll_clockwise. Set the parent to plane_01, set the force to 800 and set the direction of the force to UP. Go into the flags and check 'ignore mass'.


Place a phys_thruster on the right end on the other wing and name it plane_01_roll_counter_clockwise. Set the parent to plane_01, set the force to 800 and set the direction of the force to UP. Go into the flags and check 'ignore mass'.


Place a phys_thruster on the front of the plane and name it plane_01_up. Set the parent to plane_01, set the force to 800 and set the direction of the force to UP. Go into the flags and check 'ignore mass'.


Place a phys_thruster on the front of the plane and name it plane_01_down. Set the parent to plane_01, set the force to 800 and set the direction of the force to DOWN. Go into the flags and check 'ignore mass'.


Place a phys_thruster at the end of the left engine and name it plane_01_fly1. Set the parent to plane_01, set the force to 2000 and set the direction of the force to "14 0 0". Go into the flags and check 'ignore mass'.


Place a phys_thruster at the end of the right engine and name it plane_01_fly2. Set the parent to plane_01, set the force to 2000 and set the direction of the force to "14 0 0". Go into the flags and check 'ignore mass'.


Plane 01 finished plane.jpg


You should now have a basic working plane that will probably need some adjustments here and there.

See also