Hey there, new to defold and lua, trying to get used to it over Unity.
In my scene, I have a level.collection used in the main that contains the player game object. When his health is under 0, I delete him. This is all fine and good, but it them messes with my bad guy AI due to them no longer being able to reference his location to decide where they shoot. I’ve tried looking for ways to check that the player ~= nil, so they don’t do the related behavior in those cases, but I could not find any direct response on how that might work in defold.
So my question is, does lua/defold have a way to see that and Instance does not exist without causing an error, and if so, how would one check that?