how do I make a rotating wheel to open a gate

how do I make a rotating wheel to open a gate

Re: how do I make a rotating wheel to open a gate Posted by Zechro on Mon Jul 2nd 2007 at 1:42am
Zechro
6 posts
Posted 2007-07-02 1:42am
Zechro
member
6 posts 11 snarkmarks Registered: Jun 15th 2007
I am having trouble trying to figure out how to make one of those gates in Chapter 4: water hazard. The one where you turn the wheel to slowly open the gate and if you let go of the wheel before completely turning it, the gate closes again.Maybe you can help me.

The answer is either really obvious or really hard
Re: how do I make a rotating wheel to open a gate Posted by Riven on Mon Jul 2nd 2007 at 4:15am
Riven
1640 posts
Posted 2007-07-02 4:15am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Yea, it's pretty strait forward...

Ok, you just need two entities to get this to work. A momentary_rot_button and a func_movelinear; both of which are brush based entities. The func_movelinear will become your door. Mind you, a door that moves side to side, or up and down, that's about it. The func_movelinear is best represented by covering it with the nodraw texture and make a wheel prop (ideally the one used in the level you mentioned: models/props_borealis/door_wheel001a.mdl [use prop_dynamic[color=white]]) [/color]parented to that invisible momentary_rot_button.

Now you're pretty much free to do whatever you want with the keyvalues, but note that if you want the door to slam back down when the player is not turning the wheel, then you need to leave the "toggle" flag unchecked in the momentary_rot_button's flags and assign a number at which the speed for the door to close back when not in motion under the "auto-return speed" keyvalue.

But the real magic happens between the two entities' I/O systems...

For the momentary_rot_button's outputs, just put:

My output named: Position
Target entities named: The name you gave your func_movelinear.
Via this input: Set Position
No parameters, fire more than once, and no delay.


space

Now, for your func_movelinear we will create TWO outputs:

-Output 1-
My output named: OnFullyOpened
Target entities named: your momentary_rot_button
Via this input: Set Parent
No parameters, fire more than once, and no delay.


-Output 2-
My output named: OnFullyOpened
Target entities named: your momentary_rot_button
Via this input: Set Position
No parameters, fire more than once, and no delay.


And that's it! Just make sure your door and wheel are moving in the right direction, and you have "use activates" selected for the momentary_rot_button, and you should be set to go! After which, I would go back and tweak the settings some.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: how do I make a rotating wheel to open a gate Posted by Zechro on Tue Jul 3rd 2007 at 3:45am
Zechro
6 posts
Posted 2007-07-03 3:45am
Zechro
member
6 posts 11 snarkmarks Registered: Jun 15th 2007
Okay it works except the door doesn't stay open when it's fully open
Re: how do I make a rotating wheel to open a gate Posted by Riven on Tue Jul 3rd 2007 at 5:00am
Riven
1640 posts
Posted 2007-07-03 5:00am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Like I already noted:
myself said:
"Note that if you want the door to slam back down when the player is not turning the wheel, then you need to leave the "toggle" flag unchecked in the momentary_rot_button's flags and assign a number at which the speed for the door to close back when not in motion under the "auto-return speed" keyvalue."
If you don't want it to close back (which I thought you did based on the description of what you wanted in your original post) then you need to do the opposite. That is, DO check the "toggle" flag!
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: how do I make a rotating wheel to open a gate Posted by quanta on Fri Jul 6th 2007 at 6:30pm
quanta
33 posts
Posted 2007-07-06 6:30pm
quanta
member
33 posts 53 snarkmarks Registered: Jun 14th 2007 Occupation: Student/Programmer Location: USA
If you want the door to stay open when it's fully opened, then add this output to the momentary_rot_button:

MyOutput: OnFullyOpened
Target Entities Named: !self
Via This Input: Lock

If this doesn't work, try changing all of the OnFullyOpened outputs to OnFullyClosed outputs.
People its snarkpit.net not snarkpit.com! Be sure to check this when you add links!
Re: how do I make a rotating wheel to open a gate Posted by Zechro on Mon Jul 9th 2007 at 7:40am
Zechro
6 posts
Posted 2007-07-09 7:40am
Zechro
member
6 posts 11 snarkmarks Registered: Jun 15th 2007
ok I must've made a mistake before it works now thanks