[Solved] Rotating the panel 90 degrees
Quote from ChickenMobile on July 8, 2011, 7:30 amdhavalmistry wrote:No, I only want the panel to turn in one direction.Four directions then?
Four directions then?
Quote from dhavalmistry on July 8, 2011, 7:42 amchickenmobile wrote:Four directions then?Press the button --> Panel turns 90 degrees counter clockwise
Press the button again --> Panel turns another 90 degrees counter clockwise (180 degrees from starting position)
Press the button third time --> Panel turns (180+90) 270 degrees
Press the button 4th time --> Panel turns (270+90) 360 degrees a.k.a. starting position.
and it keeps doing that as long as the player wants.
Press the button --> Panel turns 90 degrees counter clockwise
Press the button again --> Panel turns another 90 degrees counter clockwise (180 degrees from starting position)
Press the button third time --> Panel turns (180+90) 270 degrees
Press the button 4th time --> Panel turns (270+90) 360 degrees a.k.a. starting position.
and it keeps doing that as long as the player wants.
Quote from dhavalmistry on July 8, 2011, 7:48 amRand0mNumbers wrote:Try a momentary_rot_button and send it SetPosition inputs. That's what is used in here: http://www.youtube.com/watch?v=-Epr3khsZUgIt won't go out of alignment, but I don't know how you'd keep it rotating continuously. The button doesn't wrap around to rotate from 270 to 0, it rewinds. Perhaps momentarily toggling the startdirection keyvalue would help.
Hey, I tried doing like you suggested but its not working. Maybe I am doing something wrong. Is there a vmf I can look at or can you make me one with a room and one panel rotating on press of a button please?
Thanks in advance!
It won't go out of alignment, but I don't know how you'd keep it rotating continuously. The button doesn't wrap around to rotate from 270 to 0, it rewinds. Perhaps momentarily toggling the startdirection keyvalue would help.
Hey, I tried doing like you suggested but its not working. Maybe I am doing something wrong. Is there a vmf I can look at or can you make me one with a room and one panel rotating on press of a button please?
Thanks in advance!
Quote from Kasc on July 8, 2011, 9:48 amJust an edit of my image is what you want, but the button tells the door to open and not the OnFullyClosed output.
Targetnames:
panel - the thing you want to rotate
doorparent - the thing panel gets parented to that's got a distance of 90 and set to rotate along the same axis as the panel
button: Button to rotate the panel.Output, Targetname, Input, Parameter, Delay
button:
OnPressed, !self, Lock, , 0
OnPressed, panel, SetParent, doorparent, 0
OnPressed, doorparent, Open, , 0.01doorparent:
OnFullyOpen, panel, ClearParent, , 0
OnFullyOpen, !self, Close, , 0.01
OnFullyClosed, button, UnLock, , 0
Just an edit of my image is what you want, but the button tells the door to open and not the OnFullyClosed output.
Targetnames:
panel - the thing you want to rotate
doorparent - the thing panel gets parented to that's got a distance of 90 and set to rotate along the same axis as the panel
button: Button to rotate the panel.
Output, Targetname, Input, Parameter, Delay
button:
OnPressed, !self, Lock, , 0
OnPressed, panel, SetParent, doorparent, 0
OnPressed, doorparent, Open, , 0.01
doorparent:
OnFullyOpen, panel, ClearParent, , 0
OnFullyOpen, !self, Close, , 0.01
OnFullyClosed, button, UnLock, , 0
Quote from dhavalmistry on July 8, 2011, 10:13 amKasc wrote:Just an edit of my image is what you want, but the button tells the door to open and not the OnFullyClosed output.Targetnames:
panel - the thing you want to rotate
doorparent - the thing panel gets parented to that's got a distance of 90 and set to rotate along the same axis as the panel
button: Button to rotate the panel.Output, Targetname, Input, Parameter, Delay
button:
OnPressed, !self, Lock, , 0
OnPressed, panel, SetParent, doorparent, 0
OnPressed, doorparent, Open, , 0.01doorparent:
OnFullyOpen, panel, ClearParent, , 0
OnFullyOpen, !self, Close, , 0.01
OnFullyClosed, button, UnLock, , 0I am at work right now so I cant test but just by reading it, it makes sense!
Targetnames:
panel - the thing you want to rotate
doorparent - the thing panel gets parented to that's got a distance of 90 and set to rotate along the same axis as the panel
button: Button to rotate the panel.
Output, Targetname, Input, Parameter, Delay
button:
OnPressed, !self, Lock, , 0
OnPressed, panel, SetParent, doorparent, 0
OnPressed, doorparent, Open, , 0.01
doorparent:
OnFullyOpen, panel, ClearParent, , 0
OnFullyOpen, !self, Close, , 0.01
OnFullyClosed, button, UnLock, , 0
I am at work right now so I cant test but just by reading it, it makes sense!
Quote from dhavalmistry on July 8, 2011, 7:50 pmKasc wrote:Just an edit of my image is what you want, but the button tells the door to open and not the OnFullyClosed output.Targetnames:
panel - the thing you want to rotate
doorparent - the thing panel gets parented to that's got a distance of 90 and set to rotate along the same axis as the panel
button: Button to rotate the panel.Output, Targetname, Input, Parameter, Delay
button:
OnPressed, !self, Lock, , 0
OnPressed, panel, SetParent, doorparent, 0
OnPressed, doorparent, Open, , 0.01doorparent:
OnFullyOpen, panel, ClearParent, , 0
OnFullyOpen, !self, Close, , 0.01
OnFullyClosed, button, UnLock, , 0You my friend are a GENIUS!!
It works!!
Targetnames:
panel - the thing you want to rotate
doorparent - the thing panel gets parented to that's got a distance of 90 and set to rotate along the same axis as the panel
button: Button to rotate the panel.
Output, Targetname, Input, Parameter, Delay
button:
OnPressed, !self, Lock, , 0
OnPressed, panel, SetParent, doorparent, 0
OnPressed, doorparent, Open, , 0.01
doorparent:
OnFullyOpen, panel, ClearParent, , 0
OnFullyOpen, !self, Close, , 0.01
OnFullyClosed, button, UnLock, , 0
You my friend are a GENIUS!! ![]()
It works!!
Quote from Rand0mNumbers on July 9, 2011, 7:06 amdhavalmistry wrote:Hey, I tried doing like you suggested but its not working. Maybe I am doing something wrong. Is there a vmf I can look at or can you make me one with a room and one panel rotating on press of a button please?Thanks in advance!
From your last post, you have it working, but I've attached the vmf anyways.
I don't know how to stop the panel from wrapping around. Math_counter handles integers, but not doubles, so I don't know what to do right now.Pressing the button will place the panel in 4 different positions sequentially. Once you reach the end, it will rewind itself and start again.
Thanks in advance!
From your last post, you have it working, but I've attached the vmf anyways.
I don't know how to stop the panel from wrapping around. Math_counter handles integers, but not doubles, so I don't know what to do right now.
Pressing the button will place the panel in 4 different positions sequentially. Once you reach the end, it will rewind itself and start again.
Quote from dhavalmistry on July 9, 2011, 8:50 amRand0mNumbers wrote:From your last post, you have it working, but I've attached the vmf anyways.Yes I have it working and thanks for the vmf. I am sure I will learn a thing or two from your map!
Yes I have it working and thanks for the vmf. I am sure I will learn a thing or two from your map!
