Making a break away platform that respawns in its original position after a timer is over??
So I have a platform with a falling animation attached to a trigger zone on top of the platform. In the same microchip is a timer that starts when the trigger zone is activated, which is then attached again to the power of the animation clip (which is meant to reset it). What happens though is the platform insta spawns right back in it's original position once the animation is over, (ignoring the timer?) Please help!
-
So once the animation plays, you want it to stay down until the timer finishes and then reset... but its currently snapping back up once the animation is done, is that correct?
Is your last/only keyframe in the animation set to "keep changes"? -
No I made sure it was a one time animation with keep changes off.
-
I would try setting keep changes on.
You can make it smooth into the power down so that it takes a while to come back, but even with Keep changes on, it should return to it's normal state once the keyframe is no longer receiving power.
Here's how I would set it up:
Trigger zone wired to a counter. When counter is at 1, it powers on a keyframe and Starts a timer (only connected at start timer... not timer power). When the timer hits however many seconds, it resets the counter and itself to 0.
This turns the keyframe off, but since it's set to keep changes and smooth out, it'll start at where it was turned off before returning to it's starting position. -
As soon as the timeline ends, there's no keyframe affecting your object, it goes back to where it was before all the keyframes played.
If you wanted to really simplify things, you could just extend your timeline out so the keyframe stays active for as long as your timer would have been active.
Alternately, you could do something like this: Take the timeline's Finished event from its tweak menu, and wire that to a Selector. Duplicate the last keyframe from your timeline and wire the corresponding Selector output to that keyframe. When you want to the platform to go back, send a signal to a different port on the Selector.
Or, you could wire the Finished event to another timeline. Lots of options!
Iniciar sesión para dejar un comentario.