Ok so i’ve been messing with examples from other people on how to turn a script off/on with javascript. Ive ran into a bunch of problems. I want to have an if statement look like this
if(Input.GetKeyUp(KeyCode.Q))
{
animation.Play("3dview");
player.GetComponent(playerMovement3d).enabled = true;
}
else{
player.GetComponent(playerMovement3d).enabled = false;
}
So what i want in the end result is to have the animation play which is played by pressing (q) (which works) and when it plays turn on the 3d playerMovement script and turn off the 2d playerMovement script. Once that works i also want the camera animation to play only one time until you press (e) which turns back to 2d. Please help me!!!