Difference between revisions of "Creating rotating panels"

From Valve Developer Community
Jump to: navigation, search
m (Creating Panels rotate)
(Creating Panels rotate)
Line 10: Line 10:
 
|}
 
|}
  
Open model browser and choose following settings([http://forums.thinkingwithportals.com/download/file.php?id=283&mode=view object properties]):
+
Open model browser and choose following settings:
  
 
::{| class=standard-table
 
::{| class=standard-table
Line 20: Line 20:
 
|}
 
|}
  
Go under "model" tab and select([http://forums.thinkingwithportals.com/download/file.php?id=292&mode=view model browser]):
+
Go under "model" tab and select:
 
::{| class=standard-table
 
::{| class=standard-table
 
!  Model
 
!  Model
Line 28: Line 28:
  
  
2. Create a block brush([http://forums.thinkingwithportals.com/download/file.php?id=286 brush preview] - custom size) and align it with the model. Tie it to a [[func_brush]] entity with the following settings([http://forums.thinkingwithportals.com/download/file.php?id=284&mode=view object properties]):
+
2. Create a block brush(custom size) and align it with the model. Tie it to a [[func_brush]] entity with the following settings:
 
::{| class=standard-table
 
::{| class=standard-table
 
!  Property Name || Value
 
!  Property Name || Value
Line 38: Line 38:
  
  
3. Create a [[logic_auto]] entity and set up the output as follows([http://forums.thinkingwithportals.com/download/file.php?id=287&mode=view logic_auto/outputs]):
+
3. Create a [[logic_auto]] entity and set up the output as follows:
 
::{| class=standard-table
 
::{| class=standard-table
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
Line 48: Line 48:
  
  
4. Create a [[ambient_generic]] entity with the following settings([http://forums.thinkingwithportals.com/download/file.php?id=288&mode=view ambient_generic]):
+
4. Create a [[ambient_generic]] entity with the following settings:
 
::{| class=standard-table
 
::{| class=standard-table
 
!  Property Name || Value
 
!  Property Name || Value
Line 60: Line 60:
  
  
5. Return to [[prop_dynamic]] entity and set up the output as follows([http://forums.thinkingwithportals.com/download/file.php?id=289&mode=view prop_dynamic/outputs]):
+
5. Return to [[prop_dynamic]] entity and set up the output as follows:
 
::{| class=standard-table
 
::{| class=standard-table
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
Line 68: Line 68:
  
  
6. Create a [[prop_button]] entity and set up the output as follows([http://forums.thinkingwithportals.com/download/file.php?id=291&mode=view prop_button outputs]):
+
6. Create a [[prop_button]] entity and set up the output as follows:
 
::{| class=standard-table
 
::{| class=standard-table
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
Line 89: Line 89:
  
 
[http://www.youtube.com/watch?v=Mxk9xPbsC6E Video preview]
 
[http://www.youtube.com/watch?v=Mxk9xPbsC6E Video preview]
 
  
 
== See also ==
 
== See also ==

Revision as of 01:47, 9 May 2011

Creating Panels rotate

1. Create a prop_dynamic entity with the following settings:

Property Name Value
Name trans_panel
Pitch Yaw Roll (X Y Z) 90 0 0

Open model browser and choose following settings:

Property Name Value
World Model models/anim_wp/simple_panel_transforms/simple_panel.mdl
Sequence BindPose

Go under "model" tab and select:

Model
Sequence rotate_180


2. Create a block brush(custom size) and align it with the model. Tie it to a func_brush entity with the following settings:

Property Name Value
Name trans_brush
Parent trans_panel


3. Create a logic_auto entity and set up the output as follows:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnMapSpawn trans_brush SetParentAttachmentMaintainOffset panel_attach 0.00 No
Io11.png OnMapSpawn trans_panel SetAnimation BindPose 0.00 No


4. Create a ambient_generic entity with the following settings:

Property Name Value
Name trans_sound_end
Sound name World.SpeedFlingRotatingPanelStop
Volume 2


5. Return to prop_dynamic entity and set up the output as follows:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnAnimationDone trans_sound_end PlaySound 0.00 No


6. Create a prop_button entity and set up the output as follows:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPressed trans_panel rotate_180 panel_attach 0.00 No
Io11.png OnPressed trans_panel rotate_180_reverse BindPose 0.00 No

This will rotate the panel along with brush. Second line will rotate the panel back to normal position after a delay.

set up the output to "fire only once" as follows

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPressed trans_panel rotate_180 panel_attach 0.00 Yes

Instead of prop_button you can also use trigger entity


Download panels_rotate Prefab

Video preview

See also