This may or may not be a bug as i am a noob but i am on the level named lowly kithmen on world one and i go ahead make a 2nd variable for the level and i do it corretly BUT when i attack it goes expected , and other stuff? Any idea? Im pretty sure i made the variable because i did local enemy2 = self:findNearestEnemy for the 2nd enemy so any idea why or how , or even if this is a bug?
The correct code is:
enemy1 = self.findNearestEnemy()
Its self. not self:
Use a dot instead of a colon
Actually @Mining_Magic is using Lua.
self:findNearestEnemy is a method, so it should be used like in the first example (
I believe you’re missing the
() to call the function:
local enemy2 = self:findNearestEnemy() # here ---^^
Check again how it is done in the
Thx that was the problem , again thx very much , didnt realize that was the problem