Hello all,
How could i randomly place trees throughout a map that is say 1024 x 1024?
rem load image of the tree
loadimage ( 300, "tree_001.png" )
for t=300 to 400
Createsprite ( 300+t, 300 )
SetspriteVisible ( 300+t, 0 )
SetSpriteAnimation ( 300+t, 128, 128, 6 )
setspriteframe ( 300+t, 1 )
setspriteshape ( 300+t, 0 )
next t
rem position Tree
setspriteposition ( 300+t, random ( 1024, 1024 ) + getspriteX ( 2 ) - mx# , random ( 1024, 1024 ) + getspriteY ( 2 ) - my# )
Thank you for everyones help so far. Here's a link to the progress so far.
http://www.youtube.com/watch?v=A1meEY0LgwM&feature=youtu.be