Stop model in the middle of animation
Quote from Konke on July 30, 2014, 11:41 amI would like to stop an arm panel's animation before it ends. Is this possible, not to let the animation run the whole course? Thanks in advance!
I would like to stop an arm panel's animation before it ends. Is this possible, not to let the animation run the whole course? Thanks in advance!
Quote from josepezdj on July 31, 2014, 1:08 amKonke wrote:Yeah, that's just plain embarrasing. Thanks for the reminder.Haha, don't worry about that.
I assume that you didn't eventually manage it [spoiler]and/or that you had a memory loss :p[/spoiler], so I made a quick test map for you. Check out the attachment (you know, the VMF file under sdk_content/maps/ folder and the BSP under whatever of your /maps folders).
Notes:
- I used 3 pedestal buttons: the leftmost one starts the animation of the arm model with a playback rate of 0.35, so that it's slow enough to give us time to press the following button (you could use whatever value between 0 and 1); the middle one stops the animation and the rightmost one has a playback rate of -0.35 and therefore will play the animation backwards.
- In order to use the SetPlaybackRate output on a prop_dynamic, you must first define a "Default Animation", maybe you missed that step? Remember also to set the "Hold Animation" property to YES.
Don't hesitate to ask for whatever doubt.
Haha, don't worry about that.
I assume that you didn't eventually manage it
Notes:
- I used 3 pedestal buttons: the leftmost one starts the animation of the arm model with a playback rate of 0.35, so that it's slow enough to give us time to press the following button (you could use whatever value between 0 and 1); the middle one stops the animation and the rightmost one has a playback rate of -0.35 and therefore will play the animation backwards.
- In order to use the SetPlaybackRate output on a prop_dynamic, you must first define a "Default Animation", maybe you missed that step? Remember also to set the "Hold Animation" property to YES.
Don't hesitate to ask for whatever doubt.