Help with rotating
Quote from cornontheCoD on March 13, 2008, 5:29 pmI am trying to make something that is rotating, and it is triggered by a button. I want it to rotate 90 degrees each time i push the button. I tried every type of rotating entity, and i cant get it to work. func_rotating rotates it all the way around, but i have to trigger it at the right time to stop it, which is extremely hard. all the other entities only allow it to rotate the 90 degrees, then if i push the button again, it will rotate back.
help plz?
I am trying to make something that is rotating, and it is triggered by a button. I want it to rotate 90 degrees each time i push the button. I tried every type of rotating entity, and i cant get it to work. func_rotating rotates it all the way around, but i have to trigger it at the right time to stop it, which is extremely hard. all the other entities only allow it to rotate the 90 degrees, then if i push the button again, it will rotate back.
help plz?
Quote from Aldéz on March 13, 2008, 7:05 pmCreate a func_door_rotating and make it invisible and non-solid. Also make this entity the parent of the entity you want to rotate.
An "Open" input (sent by the button) will start the rotation. Lock the button when it has been pressed down.
Add the following outputs on the func_door:
OnFullyOpen > "the rotating entity" > ClearParent
OnFullyOpen > "the func_door_rotating entity" > Close
OnFullyClosed > "the rotating entity" > SetParent > "the func_door_rotating entity"
OnFullyClosed > "the button" > PressOut (or Unlock)The func_door_rotating will rotate exactly 90 degrees (the amount can be changed in its properties). When it has finished rotating, it will leave the entity you want to rotate as it is and then close. When it is fully closed, it will make itself the parent of the entity you want to rotate and enable the player to press the button again. When the player presses the button again, the entity you want to rotate will start to rotate from its current position.
Create a func_door_rotating and make it invisible and non-solid. Also make this entity the parent of the entity you want to rotate.
An "Open" input (sent by the button) will start the rotation. Lock the button when it has been pressed down.
Add the following outputs on the func_door:
OnFullyOpen > "the rotating entity" > ClearParent
OnFullyOpen > "the func_door_rotating entity" > Close
OnFullyClosed > "the rotating entity" > SetParent > "the func_door_rotating entity"
OnFullyClosed > "the button" > PressOut (or Unlock)
The func_door_rotating will rotate exactly 90 degrees (the amount can be changed in its properties). When it has finished rotating, it will leave the entity you want to rotate as it is and then close. When it is fully closed, it will make itself the parent of the entity you want to rotate and enable the player to press the button again. When the player presses the button again, the entity you want to rotate will start to rotate from its current position.
Quote from cornontheCoD on March 13, 2008, 7:12 pmthx for the help
thx for the help
Quote from rellikpd on March 13, 2008, 8:06 pmAld?z wrote:wow thats a great idea! i haven't been mapping much lately. but plan to again sometime (mai-be) anyway, i'm gunna use this. not sure for what yet, but atleast map it just to see it work!
wow thats a great idea! i haven't been mapping much lately. but plan to again sometime (mai-be) anyway, i'm gunna use this. not sure for what yet, but atleast map it just to see it work!
Quote from Interitus on March 13, 2008, 10:14 pmI just trigger the func_rotating to stop at the right time, I dont see whats so hard about it? Its easier than what Ald?z said, just gotta do some quick math to know how long you have to set the delay on the output.
I just trigger the func_rotating to stop at the right time, I dont see whats so hard about it? Its easier than what Ald?z said, just gotta do some quick math to know how long you have to set the delay on the output.
Quote from Aldéz on March 14, 2008, 4:10 amInteritus wrote:I just trigger the func_rotating to stop at the right time, I dont see whats so hard about it? Its easier than what Ald?z said, just gotta do some quick math to know how long you have to set the delay on the output.This is what I did at first when I made a rotating ball launcher ( the one you can see in Test Chamber 18 ). However, with a func_rotating, you have to rely on a its timer. This timer, as any timer in any entity, is not exact. After a few revolutions, it will be clear that the the func_rotating is rotating more than 90 degrees. A func_door_rotating does not rely on a timer. It will always rotate exatly how much you want it.
This is what I did at first when I made a rotating ball launcher ( the one you can see in Test Chamber 18 ). However, with a func_rotating, you have to rely on a its timer. This timer, as any timer in any entity, is not exact. After a few revolutions, it will be clear that the the func_rotating is rotating more than 90 degrees. A func_door_rotating does not rely on a timer. It will always rotate exatly how much you want it.