Topic was automatically imported from the old Question2Answer platform.
Asked By
Name277
I have moved into the last part of this article here: A Bit Awake - News, making the enemies detect the scent:
the enemy is not being declared so I tried using self instead like this:
I did not use the _init function since the enemy and params are not declared, the script is attached to a KinematicBody2D node and I got this error:
By what I can understand is that there is no target being defined. This is what I used before for the enemy chasing instead of the Getting Started script from the article:
I tried using some parts of the script that I had before with the one in the article but I couldn’t get it working.
If you’re going to show code, please copy and paste it (and properly mark it up) in the message body instead of using screenshots.