I'm trying to make an event so that an enemy may spawn anywhere on the map except the player's current X any Y position but i'm not sure how to. Can anybody help me? Thanks in advance!
use a function to spawn the enemy, then , after the spawning action, check for the position... if its teh same of the player call the function again.....
the loop will continue until the spawned enemy is not on the same position than the player
Develop games in your browser. Powerful, performant & highly capable.
Something like this?
System: Random(1) = 1
create object at player.x+100+random(1000)
create object at player.x-(100+random(1000))
and same for y
edit : nah, I made a mistake