Creating rotating panels: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (screenshots)
Line 25: Line 25:
Go under "model" tab and select:
Go under "model" tab and select:
::{| class=standard-table
::{| class=standard-table
!  Model
!  Model || Value
|-
|-
| Sequence || BindPose
| Sequence || BindPose

Revision as of 10:48, 9 April 2012

Template:Otherlang2

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.
Nuvola apps ksnapshot.png
This article or section needs a screenshot to help visually convey the subject.
You can upload screenshots at Special:Upload. For help, see Help:Images.

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

Go under "model" tab and select:

Model Value
Sequence BindPose


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 SetAnimation rotate_180 0.00 No
Io11.png OnPressed trans_panel SetAnimation rotate_180_reverse 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