Wheelvalve: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 19: Line 19:




== 2) Establish Parent/Child relation between Objects ==
== 2) Establish Parent/Child relation between objects ==


Bind the two new objects together, making the '''momentary_rot_button''' entity as the ''parent'' of the '''prop_dynamic''' entity.


Bind these two objects together, making the momentary_rot_button entity as the parent of the the prop_dynamic entity.
a)  Set the '''Name''' property for each of the entities.  (Give each entity a unique, meaningful name.)  For example:
 
4)  Set the '''Name''' property for each of the entities.  (Give each entity a unique, meaningful name.)  For example:


     momentary_rot_button Name =  MyValveRotator
     momentary_rot_button Name =  MyValveRotator
     prop_dynamic Name =          MyValve
     prop_dynamic Name =          MyValve
      
      
5) Set the '''Parent''' property of the prop_dynamic entity to the name of the momentary_rot_button entity.
c) Set the '''Parent''' property of the prop_dynamic entity to the name of the momentary_rot_button entity.
      
      
     prop_dynamic Parent =        MyValveRotator
     prop_dynamic Parent =        MyValveRotator

Revision as of 12:50, 16 February 2009

HOW TO MAKE A VALVEWHEEL TURN ON/OFF (OPEN AND CLOSE)

DESIRED EFFECTS: Player can +USE the pipe valvewheel and the valvewheel will turn (to Open). User can repeat the +USE action and the valve will toggle (turn the other way (to Close)). The steps below describe how to build the prop and its dynamics.


1 ) Required Objects

a) Create a new texture brush and set it as a momentary_rot_button entity.

b) Ensure these flags are set:

     Not Solid       Checked      
     Toggle          Checked
     Use Activates   Checked

c) A new prop_dynamic entity and browse/set its world model/skin as model:

   valvewheel002.mdl


2) Establish Parent/Child relation between objects

Bind the two new objects together, making the momentary_rot_button entity as the parent of the prop_dynamic entity.

a) Set the Name property for each of the entities. (Give each entity a unique, meaningful name.) For example:

   momentary_rot_button Name =  MyValveRotator
   prop_dynamic Name =          MyValve
   

c) Set the Parent property of the prop_dynamic entity to the name of the momentary_rot_button entity.

   prop_dynamic Parent =        MyValveRotator
   

6) Set an output statemet in the momentary_rot_button entity's OTIP settings (i.e. Output, Target, Input, Parameter Override settings in the entity's Properties | Outputs tab-page). Use the following values:

  Output...    OnPressed
  Target...    MyValve
  Input...     SetAnimation
  Parameter... Open
  

Finally, drag the momentary_rot_button brush over the prop_dynamic entity, making sure that the prop_dynamic entity is completely enclosed.

IMPORTANT! The momentary_rot_button brush placement/position will effect the precision of prop's dynamics. For example, if the brush is moved away from its associated prop, the rotation performance of the prop will behave like a right/left/up/down lever off of various axises. A good practice is to make sure that the Origin centers for the brush and the prop are equally aligned to each other. (You can experiment with the brush placement to illustrate this.)


Updates pending.