I can not make the nightmare character disappear after being killed

5

I'm following all the steps of a tutorial on creating the game Nightmare, videos made by 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 dying and disappearing from the game, he just stands still on the screen and this error appears:

  

'Zombunny' AnimationEvent 'RestartLevel' has no receiver! Are you missing a component?

Can anyone help me solve it?

    
asked by anonymous 07.05.2015 / 22:51

1 answer

1

Try to destroy the zombunny object.

Put an if (if the zombunny dies). I do not know if it has a life script in the object.

Destroy(this.gameobject);

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

    
22.05.2015 / 02:15