Question is off-topic or not relevant:
Don't ask for code on Unity Answers. Put some effort into learning. Check out the FAQ.
Spawn new character after animation
I want to make the following:
The player spawn (unity standard first person). It's animation play, and then he is teleported to a certain location.
Ex:
The player start in a chair. he moves his head to see what's going around and then it's old version (in the chair) is deleted, and a new copy of the player is created in front of the chair.
Any script that can do this?
Answer by RavenOfCode · May 28, 2016 at 04:11 AM
This is pretty simple. Start with a player in the chair (or wherever) in your scene, then call an animation in Start() or whenever:
animator.Play("Something");
When you call the animation also Invoke a method that moves the player:
Invoke("MovePlayer", 1);
void MovePlayer ()
{
player.transform.position = new Vector3 (some location);
}
Hope this helps!
Can you give me some help? I am getting an error. Here's my script. Did i writed something wrong?
Here's a image: http://s33.postimg.org/fvgwnfbyn/image.png