Shavv
Member
Heey guys, i need some help. After i make my units order to move i want them to have a formation. But im having trouble creating a formation. I could make the formation with hand and assign each unit number to a position one by one, but having over 100 units would be a huge task.
So i wanted to know if there is a math equation to this outcome i want to have.
I also saw some other post with a similiar-ish problem but wasn't really helpfull.
So i wanted to know if there is a math equation to this outcome i want to have.
I also saw some other post with a similiar-ish problem but wasn't really helpfull.
Code:
if selected=true
{
if mouse_check_button_pressed(mb_right)
{
walkx=mouse_x
walky=mouse_y
}
}
if state=0
{
if distance_to_point(walkx,walky)>1
{
mp_potential_step_object(walkx,walky,movespeed,SOLID)
if xprevious<x {image_xscale= 1}
if xprevious>x {image_xscale=-1}
}
}