Rotating object in need of help
Quote from KyloX on June 7, 2014, 5:51 amHey yo,
Alright, this is what I got: an object and 2 buttons.What I want:
When pressed button 1, it turns 90 degrees left. After 2-3 seconds, you can press the button again and it turns left once more. This can continue on and on.When pressed button 2, it turns 90 degrees right. Same features as button 1 just in the other direction.
What I tried:
door_rotating - works almost good, but has a fixed distance, meaning that only once you can turn into wanted directionfunc_rotating - would be best, but doesn't have distance.
Help me out here.
Thanks in advance
Hey yo,
Alright, this is what I got: an object and 2 buttons.
What I want:
When pressed button 1, it turns 90 degrees left. After 2-3 seconds, you can press the button again and it turns left once more. This can continue on and on.
When pressed button 2, it turns 90 degrees right. Same features as button 1 just in the other direction.
What I tried:
door_rotating - works almost good, but has a fixed distance, meaning that only once you can turn into wanted direction
func_rotating - would be best, but doesn't have distance.
Help me out here.
Thanks in advance
http://steamcommunity.com/profiles/7656 ... shopfiles/
Quote from TeamSpen210 on June 7, 2014, 4:36 pmThe speed parameters for func_rotatings are in degrees per second (func_doors/movelinears are hammer units per second). If you set the speed to 90, it will take exactly 1 second to rotate 90 degrees. What you want to do is have outputs to start it rotating and then stop it 1 second later. Use the Lock and Unlock inputs to prevent pressing buttons while it's moving and messing up the system.
Alternatively, you could have two func_door_rotatings, one for each direction. To rotate parent the object to the door, Open it, then ClearParent and Close the door to reset it. The various OnOpen, OnClose, OnFullyOpen, OnFullyClosed outputs will be helpful in setting outputs. OnButtonPressed Lock both buttons, set the parent, set the speed of the door to whatever you want, then open the door 0.01s later (to make sure the inputs fire). OnFullyOpen clear the parent, set the speed to something like 100000 (so it resets very fast), then close the door 0.01s later. OnFullyClosed Unlock the buttons.
The speed parameters for func_rotatings are in degrees per second (func_doors/movelinears are hammer units per second). If you set the speed to 90, it will take exactly 1 second to rotate 90 degrees. What you want to do is have outputs to start it rotating and then stop it 1 second later. Use the Lock and Unlock inputs to prevent pressing buttons while it's moving and messing up the system.
Alternatively, you could have two func_door_rotatings, one for each direction. To rotate parent the object to the door, Open it, then ClearParent and Close the door to reset it. The various OnOpen, OnClose, OnFullyOpen, OnFullyClosed outputs will be helpful in setting outputs. OnButtonPressed Lock both buttons, set the parent, set the speed of the door to whatever you want, then open the door 0.01s later (to make sure the inputs fire). OnFullyOpen clear the parent, set the speed to something like 100000 (so it resets very fast), then close the door 0.01s later. OnFullyClosed Unlock the buttons.
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
Quote from josepezdj on June 9, 2014, 2:32 amI'd use a couple of func_doors or func_rot_button in this case. You can control the degrees you want it to open at, speed, sounds and so on... and you can use the flag "Reverse Dir" to set one to move in the default direction and other one in the reverse one (a minus "-" sign before the degrees value in the case of the func_doors to make it move in reverse).
I'd use a couple of func_doors or func_rot_button in this case. You can control the degrees you want it to open at, speed, sounds and so on... and you can use the flag "Reverse Dir" to set one to move in the default direction and other one in the reverse one (a minus "-" sign before the degrees value in the case of the func_doors to make it move in reverse).