Hi all, I've been trying to get it to work for all day long and searched on the forums for how to use distance. Please help me.
I have two actors, enemies which wil be randomly created by a timer, and robots which will be created by clicking a button.
What I want to do is ; when the robot is 50 (that may change) pixels from enemies, it starts shooting a it.
I tried various things like:
if(distance(x, y, enemies.x, enemies.y) <=50)
{
create timer, bla bla bla...
}
Well, it does not work, in fact the robot shoots all the time, it does wait to be near enemies. I'm almost 99% sure that it has something to do with correctly setting distance...or clones... OR MAYBE THE EVIL ZOMBIE DUCKS.
Could someone help me with this? please?