I can’t make the character of Nightmare disappear after he’s dead

Asked

Viewed 248 times

5

I’m following all the steps of a tutorial on the creation of the game Nightmare, videos made by the channel "Playing with Nils", but after following all the steps, when I run the game and then I kill the Zombunny (an enemy), instead of him dying and disappearing from the game, he just stands on the screen and appears this error:

'Zombunny' Animationevent 'Restartlevel' has no receiver! Are you Missing a Component?

Can someone help me solve?

  • 2

    You can edit your question and put the link to the tutorial?

  • 3

    It seems that the enemy object does not have a code component that would need to receive such an event. Have you checked this? Also, do as suggested by colleague @Ciganomorrisonmendez: post the tutorial video (and indicate the minutes of the video where this part is held). If you don’t make it easy, no one will be interested in helping you. P.S.: This also goes for your other question.

  • It seems that the Portuguese tutorial is here https://www.youtube.com/playlist?list=PLa2bQ5uCFWA1RNqmaQIAWiq5HiWUGATyC, taken from the Unity http://unity3d.com/learn/tutorials/projects/survival-shooter.

  • Just for the record, another question was created with "potentially" the same problem: http://answall.com/questions/65331/erro-no-unity5-player-animationevent-restartlevel-has-no-receiver-are-you

1 answer

1

Try to destroy the object Zombunny.

Put an if(if Zombunny dies). I don’t know if you have a life script on the object.

Destroy(this.gameobject);

This command destroy makes the object disappear if you have a script with that line.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.