Page 1 of 1

collisions while using moveto();?

PostPosted: Tue Mar 16, 2010 11:02 am
by jimmynewguy
Does anyone know a way i can do collisions while using the moveto(); funtion? It's for that rts game im making and i dont want "troops" to go inside eachother. It looks dumb and makes them hard to select just one :P

Re: collisions while using moveto();?

PostPosted: Tue Mar 16, 2010 1:05 pm
by thunderios
Isn't there an argument that makes you dodge the specified object(s)?
I tested it, and the behave very funny if they're with ten of them XD But it's most likely not what you want.
You can also make an algorithm that will make your units go to certain positions depending on a number you give them when you select them: Selected[i] goes to
Code: Select all
x=(5 mod(i))*width;
y=bottom(i/5)*height;
Or something like that

Re: collisions while using moveto();?

PostPosted: Wed Mar 17, 2010 12:36 am
by jimmynewguy
actually your post made me think of another way to do this, but thanks alot! i wouldnt have thought of it without you :)