when the EnemyNPC is dead, the gmae stops..

Jeremy

New member
Hello...Excuse Me...I need help...I am a begginer..

I want to make a game like this...

While an NPC is walking...and suddenly it watches an Enemy NPC....

The NPC start to Attck the Enemy NPC, and when the Enemy NPC is dead,

a NPC start to walk again..


But In Unity Editor...with These Script...Suddenly game stops,

when the EnemyNPC is dead, the game stops..

and the error message is " target Object is destoyed, buy you are still try to access it."(=WithinSight.script)
 

Attachments

  • ErrorMessageScreenShot.png
    ErrorMessageScreenShot.png
    329.9 KB · Views: 12
Last edited:
It looks like you have an error within the WithinSight task. That task doesn't look like it's included with Behavior Designer so you'll need to fix that error. Your tree looks correct.
 
Also, in your console window you have “Error Pause” enabled. That is what’s causing Unity to freeze. This is useful for debugging but probably not something you want on all the time.
 
Top