yeah thats' not exactly what i wanted, but thanks anyway.
i'll explain my code a bit: object 500 is the 3d mouse cursor that i made, so when you right click, whatever soldiers are selected get orders to move to the location of the cursor at the time of the click.
the select array is for determining wether a soldier is selected or not and for each soldier what his position orders are. as i said before, in the selection array, the second level of data (select(selection,
1 2 or 3) is each soldiers x, y, and z position orders, wich are declared when you right-click on a location.
rhold is just a holding variable that makes sure that when you right-click, the orders are only given once (so that the soldier won't follow your cursor if you hold it down).
soldiercount is the number of troops there are presently. right now it's 10, but i made my program in such a way so that if i increase the number of soldiers, everything still works.
now the number variable finds how many soldiers are selected in this for next statement:
for selection = 1 to soldiercount
if select(selection)=1 then inc number
if number = 1
soldier1 = selection
else
soldier1 = 0
endif
if number = 2
soldier2 = selection
else
soldier2 = 0
endif
if number = 3
soldier3 = selection
else
soldier3 = 0
endif
next selection
i have only made formations for 3 amounts of selected soldiers(1,2,and 3) but will make more later.
soldier1, soldier2, and soldier3 are assigned the value of whatever units are selected, with soldier1 being the soldier with the least object number, soldier2 being the soldier with the next greatest object number, and so on.
so now that i have explained all that i can without giving you my entire code, somebody please help!
Your Head A-Splode