need some math that will create an object at random time intervals in randome locations... tried random(window.height,window.width) but that didn't work
Here:
https://www.dropbox.com/s/ysgq9jbgydm37 ... .capx?dl=0
for starters it's X, Y (width, height) not Y,X
Try this demo
thanks they both work well - one more thing.... how can I have it AVOID being created ontop of a certain object I have roads set as solids and I dont want them spawning there...
Develop games in your browser. Powerful, performant & highly capable.
use solids coordinate and use that as your guide not to spawn objects on
got it i figured it out - I actually just set it to check if it is overlapping either and if it is to destoy it and pick another spot... seems to work ok...only prob I having now is the enemy tank runs around but sometimes is getting stuck on the side walls and wont move... I added a buffer to the side walls and added that to his obstacles but he still gets stuck on that now... seems when he rotates he overlaps the buffer and gets stuck...