I have a part of my level where the player travels across a platform, avoiding obstacles and moving objects in order to reach the end. Should the player say get knocked off and fall to his death, I would want the platform that he was riding to reset to its original position and wait till the player jumps back on for another attempt.
Here is a picture demonstrating what I want to have!
Here is the code I have so far.
I have it to where it waits 3 seconds after the player jumps on to start, but I dont know how to get it to reset the animation and wait 3 seconds after the player jumps on!
var anim : String;
var animatingObject : GameObject;
function OnTriggerEnter(other : Collider)
{
if (other.tag == "Player")
{
yield WaitForSeconds(3.0);
animatingObject.animation.Play();
}
}
Any help or guidance would be very greatly appreciated!
Let me know if you need any additional info needed to help!