Animation Blending
Quote from Nidonocu on May 30, 2011, 10:16 amI've been using floor buttons and lasers to hide and show other elements on my map using panels. However, if the player rapidly triggers the switch on and off (while say, trying to aim the laser or place the cube correctly), the animations can get confused, cut one another off, and sometimes end up in the wrong state.
I've tried to replicate this with buttons in the real game and the panels in game naturally blend from the start animation to the return animation when I trigger the button quickly. How do I replicate this myself?
I've been using floor buttons and lasers to hide and show other elements on my map using panels. However, if the player rapidly triggers the switch on and off (while say, trying to aim the laser or place the cube correctly), the animations can get confused, cut one another off, and sometimes end up in the wrong state.
I've tried to replicate this with buttons in the real game and the panels in game naturally blend from the start animation to the return animation when I trigger the button quickly. How do I replicate this myself?
Quote from tungsten on May 30, 2011, 10:36 amWhen I ran into this issue, someone told me to try using "SetPlaybackRate" to -1, to make the animation run in reverse.
For my own problem, I needed the animation to finish first before it went back. So I used a combination of 2 logic_branches (button_pressed and animation_ready) and branch_listener that listened for either both to be true to trigger the open_relay and both to be false to trigger the close_relay. That's a little more complicated, but fixed my problem.
When I ran into this issue, someone told me to try using "SetPlaybackRate" to -1, to make the animation run in reverse.
For my own problem, I needed the animation to finish first before it went back. So I used a combination of 2 logic_branches (button_pressed and animation_ready) and branch_listener that listened for either both to be true to trigger the open_relay and both to be false to trigger the close_relay. That's a little more complicated, but fixed my problem.
Quote from RageCompeX on May 30, 2011, 10:47 amwell I exely have the same question here.. I want that Lift what moves in and out, when stand on button go up, and when not go down without finishing the full animation, I need those Victory lifts
well I exely have the same question here.. I want that Lift what moves in and out, when stand on button go up, and when not go down without finishing the full animation, I need those Victory lifts ![]()
Quote from Another Bad Pun on May 30, 2011, 11:27 amsp_a4_laser_catapult has a good example on that. (Logic_case here we come!)
sp_a4_laser_catapult has a good example on that. (Logic_case here we come!)
Quote from tungsten on May 30, 2011, 2:44 pmRageCompeX wrote:well I exely have the same question here.. I want that Lift what moves in and out, when stand on button go up, and when not go down without finishing the full animation, I need those Victory liftsThat's like my issue. In order to do this, I did used the following:
prop_floor_button (outputs: OnPressed set button_pressed true; OnUnPressed set button_pressed false)
logic_branch (button_pressed)
logic_branch (animation_ready, starts as true)
logic_relay (open_animation; outputs: <animate all panels>; set animation_ready to false after x seconds)
logic_relay (close_animation; outputs: <animate all panels>; set animation_ready to true after x seconds)
logic_branch_listener (listens button_pressed and animation_ready; outputs: OnAllTrue trigger open_animation; OnAllFalse trigger close_animation)I'm not sure that's a very good tutorial, but it's the best I can do at the moment. With this setup, when you spam the floor button, the panels will open all the way first, then close immediately after it's finished opening. And if it starts closing, it will finish closing before it opens up again.
That's like my issue. In order to do this, I did used the following:
prop_floor_button (outputs: OnPressed set button_pressed true; OnUnPressed set button_pressed false)
logic_branch (button_pressed)
logic_branch (animation_ready, starts as true)
logic_relay (open_animation; outputs: <animate all panels>; set animation_ready to false after x seconds)
logic_relay (close_animation; outputs: <animate all panels>; set animation_ready to true after x seconds)
logic_branch_listener (listens button_pressed and animation_ready; outputs: OnAllTrue trigger open_animation; OnAllFalse trigger close_animation)
I'm not sure that's a very good tutorial, but it's the best I can do at the moment. With this setup, when you spam the floor button, the panels will open all the way first, then close immediately after it's finished opening. And if it starts closing, it will finish closing before it opens up again.
Quote from Nidonocu on June 1, 2011, 4:24 amI just tried the rewind version and the effect was.. a bit better, but not perfect. I'll probably let the animations complete first I think. And considering I have six panels with different animations, this should be fun!
Sarcasm Self Test - Complete
I just tried the rewind version and the effect was.. a bit better, but not perfect. I'll probably let the animations complete first I think. And considering I have six panels with different animations, this should be fun! ![]()
Sarcasm Self Test - Complete
Quote from RageCompeX on June 1, 2011, 4:58 amtungsten wrote:RageCompeX wrote:well I exely have the same question here.. I want that Lift what moves in and out, when stand on button go up, and when not go down without finishing the full animation, I need those Victory liftsThat's like my issue. In order to do this, I did used the following:
prop_floor_button (outputs: OnPressed set button_pressed true; OnUnPressed set button_pressed false)
logic_branch (button_pressed)
logic_branch (animation_ready, starts as true)
logic_relay (open_animation; outputs: <animate all panels>; set animation_ready to false after x seconds)
logic_relay (close_animation; outputs: <animate all panels>; set animation_ready to true after x seconds)
logic_branch_listener (listens button_pressed and animation_ready; outputs: OnAllTrue trigger open_animation; OnAllFalse trigger close_animation)I'm not sure that's a very good tutorial, but it's the best I can do at the moment. With this setup, when you spam the floor button, the panels will open all the way first, then close immediately after it's finished opening. And if it starts closing, it will finish closing before it opens up again.
More of a problem is how I attach everything togheter, I exely made a thread about it yesterday called Lift.
That's like my issue. In order to do this, I did used the following:
prop_floor_button (outputs: OnPressed set button_pressed true; OnUnPressed set button_pressed false)
logic_branch (button_pressed)
logic_branch (animation_ready, starts as true)
logic_relay (open_animation; outputs: <animate all panels>; set animation_ready to false after x seconds)
logic_relay (close_animation; outputs: <animate all panels>; set animation_ready to true after x seconds)
logic_branch_listener (listens button_pressed and animation_ready; outputs: OnAllTrue trigger open_animation; OnAllFalse trigger close_animation)
I'm not sure that's a very good tutorial, but it's the best I can do at the moment. With this setup, when you spam the floor button, the panels will open all the way first, then close immediately after it's finished opening. And if it starts closing, it will finish closing before it opens up again.
More of a problem is how I attach everything togheter, I exely made a thread about it yesterday called Lift.
