Greetings! how are you all?
Well...I'm having a little problem with unit selection handling...for example, if I have a unit, and select it and move it, it does it correctly, but if I have that unit selected and create another and try to move the unit (not the created one) then the movement is screwed up. It also happens when I have 2 units selected, let's say A & B. A and B are selected and I told them to move somewhere. While they are moving to that spot, I select B unit and tell him to move to another spot. Well, the 2 units move and no one goes neither the first or the second spot

. Try it and you'll see
You don't need ANY media to test it, just copy, paste and try
I hope someone can help me
`My RTS (don't have name for it now)
`By DARKGuy
`Mouse control by Van-B (Thanks a lot!)
`The "distance between objects" function (dist_obj) by David89
`The way and some code of handling teams, making selection boxes, selecting units
`and moving units by Red General and were slightly modified by me (I learned a lot with
`those parts of code) :)
`Also special thanks to Phaelax for his RTS game code because it helped me to optimize
`a bit my code and to understand a lot of things (one of them are the statistic(1) array) :)
`Globalised variables for MUS function
dim musx#(1)
dim musy#(1)
dim musz#(1)
True=1
False=0
MSpeed=20
`Unit handling
`up to 9 now
MaxUnits=99
dim MaxUnit(0)
MaxUnit(0)=MaxUnits
dim Unit(100)
dim UnitType(100)
dim UnitSize#(100)
dim Selected(100)
dim Team(5,3)
dim Go_ToX(100)
dim Go_ToY(100)
dim UnitOffset(100)
`UnitType = UT
`-99 = Test cube
`1 = Convoy truck
`2 = tank
UT=-99
gosub Init_Game
gosub Make_Scenery
gosub Init_Camera_and_Mouse
`This Make_GUI needs media so don't execute it
`gosub Make_GUI
`Main loop
do
gosub _Handle_Mouse
gosub _Handle_Keyboard
dragbox=0
moldx#=0
moldy#=0
gosub calc_camera
gosub calc_mouse
gosub _Handle_SelecBox
gosub _Handle_Units
` if inkey$()="1" then UT=1
` if inkey$()="2" then UT=2
ink rgb(255,255,255),rgb(0,0,0)
set cursor 0,0
print "FPS:",screen fps()
print "Polys: ",statistic(1)
print " "
print "Press [Q] to make a new unit (sample cube) in the mouse position"
print "dragbox = ",dragbox
print "mp = ",mp
print "UnitType = ",UT
print " "
print "firstx = ",firstx
print "firsty = ",firsty
print " "
print "lastx = ",lastx
print "lasty = ",lasty
print " "
sync
loop
calc_mouse:
`Calculate the MMZ# and MMX# as 0.0-1.0 floating point variables
mmz#=(((my*1.0)/(screen height()*1.0))-1.05)*(camy#*2.10)
mmx#=(((mx*1.0)/(screen width()*1.0))-0.500)*(camy#*2.0)*(1.10-(((my*1.15)/(screen height()*1.15))-0.575))
mx#=newxvalue(camx#,camera angle y(),0-mmz#)
mz#=newzvalue(camz#,camera angle y(),0-mmz#)
mx#=newxvalue(mx#,wrapvalue(camera angle y()-90),0-mmx#)
mz#=newzvalue(mz#,wrapvalue(camera angle y()-90),0-mmx#)
position object 2,mx#,0,mz#
osy=object screen y(2)
osx=object screen x(2)
`Stand-in cursor
ink rgb(255,255,0),0
line osx-10,osy,osx+10,osy
line osx,osy-10,osx,osy+10
` sprite 100,osx,osy,200
`Click the mouse to position the box
`NOTE: Everytime you click on the matrice musx#(1) etc are set, so you'd do all your mouseclick chores here
if mc=1 and mp=0
mus(mx#,mz#)
firstx = osx
firsty = osy
lastx = osx
lasty = osy
mp = 1
Else
if mc=2
DeSelectAll()
endif
endif
if inkey$()="q" and tt<=0
mus(mx#,mz#)
new_unit(musx#(1),musy#(1),musz#(1),MaxUnits,UT)
tt=5
endif
if mc=1 and mp = 1
mus(mx#,mz#)
lastx = osx
lasty = osy
DrawBox(firstx,firsty,lastx,lasty)
endif
SelectedSomething = 0
if mc=0
If mp = 1
If Dragging(firstx,firsty,lastx,lasty)=0
rem *** Then they might have clicked on a single tank. If they have,
rem *** then select it, and deselect everything else.
For t = 2000 to 2000+MaxUnits
If ClickedOnObject(firstx, firsty, t)=1
DeSelectAll()
SelectOnly(t,MaxUnits)
SelectedSomething = 1
Exit
EndIf
Next t
rem *** They didn't click on a tank, so move any currently selected units
rem *** to the point they chose. Note that the formula we use to locate
rem *** this point isn't really accurate, but translating a click on a
rem *** screen, to a point in 3D game space, is no trivial matter.
If SelectedSomething = 0
` SetUpMove(CamX+((MouseX()-400)*1.5),(CamZ+500)+((300-MouseY())*2.0),MaxUnits)
SetUpMove(musx#(1),musz#(1),MaxUnits)
EndIf
EndIf
mp = 0
EndIf
EndIf
rem *** If we're clicking...
If mp = 1
rem *** Then for each tank...
for t = 2000 to 2000+MaxUnits
rem *** If we're still dragging...
if (mc=1) And (Dragging(firstx,firsty,lastx,lasty)=1)
rem *** and this tank (t) is inside the box we're dragging...
If IsInBox(firstx,firsty,lastx,lasty,t)=1
rem *** then select it...
Selectt(t)
SelectedSomething = True
rem *** otherwise, deselect it.
else
DeSelect(t)
endif
endif
next t
EndIf
if tt>0 then dec tt
return
calc_camera:
`Very important, you can't change this without changing the forumulaes - live with it if you can
rotate camera 55,yang,0
mmx=0
mmz=0
msx=mx : if msx<0 then msx=0
msy=my : if msy<0 then msy=0
mox=screen width()-mx : if mox<0 then mox=0
moy=screen height()-my : if moy<0 then moy=0
`Check the edges of the screen and set the values for push scrolling
` if msx<50 then mmx=(-50.0+msx)/1.5
` if msy<50 then mmz=(-50.0+msy)/1.5
` if mox<50 then mmx=(50.0-mox)/1.5
` if moy<50 then mmz=(50.0-moy)/1.5
if mousex()>screen width()-25 then mmx=mmx+MSpeed
if mousex()<25 then mmx=mmx-MSpeed
if mousey()>screen height()-25 then mmz=mmz+MSpeed
if mousey()<25 then mmz=mmz-MSpeed
`Calculate the new camera position based on the push scrolling values
camx#=newxvalue(camx#,camera angle y(),0-mmz)
camz#=newzvalue(camz#,camera angle y(),0-mmz)
camx#=newxvalue(camx#,wrapvalue(camera angle y()-90),0-mmx)
camz#=newzvalue(camz#,wrapvalue(camera angle y()-90),0-mmx)
camh#=get ground height(1,camx#,camz#)
if camy#<camh#+50.0 then camy#=camh#+50
position camera camx#,camy#,camz#
position object 3,camx#,camy#,camz#
return
`This function will return the 3D cursor location based on X, Z, and a height of 0
`It stores the results in musx#(1),MUSY#,MUSZ#
function mus(mx#,mz#)
musx#(1)=mx#
musy#(1)=0
musz#(1)=mz#
position object 2,mx#,0,mz#
point object 2,camera position x(),camera position y(),camera position z()
while object position y(2)<camera position y()
`NOTE - the 25 is for the accuracy, this needs to be as big as you can for speed sakes
`about 1/4 of a tiles width is reasonable, however it can be much less without killing the speed
move object 2,25
mh#=get ground height(1,object position x(2),object position z(2))
if object position y(2)<mh#
musx#(1)=object position x(2)
musy#(1)=object position y(2)
musz#(1)=object position z(2)
endif
endwhile
musy#(1)=get ground height(1,musx#(1),musz#(1))
endfunction
Init_Game:
sync on
sync rate 0
autocam off
set display mode 640,480,16
return
Make_Scenery:
` load image "textures\grass2.bmp",1
`Make a test texture
cls rgb(0,255,0)
ink rgb(0,32,0),rgb(0,32,0)
box 1,1,31,31
get image 1,0,0,32,32
ink rgb(255,255,0),0
`Simple matrix
make matrix 1,6400,6400,32,32
prepare matrix texture 1,1,1,1
randomize matrix 1,180
update matrix 1
smooth_matrix(1,32,32)
set matrix 1,1,1,1, 1,1,1,1
` set matrix texture 1,1,1
update matrix 1
set directional light 0,0,-1,0
return
Init_Camera_and_Mouse:
yang=0
`Object 2 is the fake mouse pointer, but it can be reused for other calculations too
make object cube 2,30 : hide object 2
hide mouse
make object sphere 3,10
`Default camera start location
camy#=500
camx#=3200
camz#=3200
return
_Handle_Mouse:
mx=mousex()
my=mousey()
mc=mouseclick()
return
_Handle_Keyboard:
if leftkey()=1 then yang=wrapvalue(yang-1)
if rightkey()=1 then yang=wrapvalue(yang+1)
if upkey()=1 then inc camy#,10
if downkey()=1 then dec camy#,10
return
function New_Unit(x#,y#,z#,MU,UType)
set cursor 0,0
for a=0 to MU
if Unit(a)=0 then exit
next a
print a
Unit(a)=1
UnitType(a)=UType
make object cube 2000+a,10
hide limb 2000+a,0
select UType
case -99
make object cube 1000+a,50+rnd(100)
set object collision to boxes 2
set object collision to boxes 1000+a
y#=get ground height(1,x#,z#)
`glue it to the invisible object
Glue Object To Limb 1000+a,2000+a,0
position object 2000+a,x#,y#,z#
UnitSize#(a)=100
UnitOffset(a)=150
endcase
case 1
load object "3d\units\convoytruck.3ds",1000+a
scale object 1000+a,20,20,20
set object collision to boxes 2
set object collision to boxes 1000+a
y#=get ground height(1,x#,z#)
`glue it to the invisible object
Glue Object To Limb 1000+a,2000+a,0
position object 2000+a,x#,y#,z#
UnitSize#(a)=20
UnitOffset(a)=80
endcase
case 2
load object "3d\units\tank1.3ds",1000+a
scale object 1000+a,80,80,80
set object collision to boxes 2
set object collision to boxes 1000+a
y#=get ground height(1,x#,z#)
`glue it to the invisible object
Glue Object To Limb 1000+a,2000+a,0
position object 2000+a,x#,y#,z#
UnitSize#(a)=80
UnitOffset(a)=120
endcase
endselect
endfunction
_Handle_Units:
for aa=0 to MaxUnits
obj=1000+aa
limb=2000+aa
if object exist(obj)=1
tx1$="Selected("
tx1$=tx1$ + str$(aa)
tx1$=tx1$ + ") = "
tx1$=tx1$ + str$(Selected(aa))
print tx1$
osx=object screen x(obj)
osy=object screen y(obj)
us#=UnitSize#(aa)
scale object obj,us#,us#,us#
ink rgb(255,0,0),rgb(0,0,0)
osx2=object screen x(limb)
osy2=object screen y(limb)
osy3=osy2 - object size y(obj)/6
` center text osx2,osy3,str$(aa)
print "Destination object exist? = ",object exist(5000+aa)
If (Go_ToX(aa) > 0) Or (Go_ToY(aa) > 0)
if object exist(5000+aa)=1
position object 5000+aa,object position x(limb),object position y(limb),object position z(limb)
endif
Point Object limb+3000, Go_ToX(aa), 40, Go_ToY(aa)
position object limb+3000,Xpos#,0,Zpos#
yrotate object limb,curveangle(object angle y(limb+3000),Yang#,10)
YAng#=object angle y(limb)
Move Object limb,5
Xpos#=Object Position X(limb)
Zpos#=Object Position Z(limb)
Tilt(1,obj,limb,YAng#,Xpos#,Zpos#,50.0)
rem *** move forward, then back if we hit something
If Colliding(limb,MaxUnits)=True
Move Object limb,-5
` Hit(i) = Hit(i) + 1
` If Hit(i) > 30
` Halt(i)
` EndIf
EndIf
rem *** position the health bar for each tank
positionhealthbar(limb,UnitOffset(aa))
rem *** stop the tank if it's within 6 world units of its final
rem *** destination
If (Go_ToX(aa) > 0) Or (Go_ToY(aa) > 0)
dx# = Abs(Go_ToX(aa) - Object Position X(limb))
dz# = Abs(Go_ToY(aa) - Object Position Z(limb))
If (dx# < 20) And (dz# < 20)
Halt(limb)
EndIf
EndIf
EndIf
` Xpos#=Object Position X(limb)
` Zpos#=Object Position Z(limb)
` YAng#=object angle y(limb)
`Tilt(Matrix Number,YAngle of Hidden Object,Xpos,zpos,base(width of object))
` Tilt(1,obj,limb,YAng#,Xpos#,Zpos#,50.0)
ink rgb(255,255,255),rgb(0,0,0)
print "Go_ToX = ",go_tox(aa)
print "Go_ToY = ",go_toy(aa)
print "Object Screen X (osx) = ",osx
print "Object Screen Y (osy) = ",osy
dist#=dist_obj(obj,3)
print "Object's distance to camera = ",dist#
newx=object screen x(obj)
newy=object screen y(obj)
if OIS(limb,newx-osx,0-(newy-osy))=0 or dist_obj(limb,3)>1050
scale object obj,0,0,0
endif
else
goto nxt1
endif
nxt1:
next a
return
rem Returns distance between o and o2
rem code by David89
function dist_obj(o,o2)
ox#=object position x(o2)
oz#=object position z(o2)
oy#=object position y(o2)
dx#=object position x(o)-ox#
dz#=object position z(o)-oz#
dy#=object position y(o)-oy#
dist#=sqrt((dx#*dx#)+(dz#*dz#)+(dy#*dy#))
endfunction dist#
`Smooth Matrix function taken from the DBC examples. It was adapted to use it with
`any matrix by DARKGuy.
`If you're going to use it, just copy & paste the text above and put it in your
`program's code.
function smooth_matrix(n,tilesx,tilesy)
for z=1 to tilesy-1
for x=1 to tilesx-1
rem Obtener alturas de la matriz
h8#=get matrix height(n,x,z-1)
h4#=get matrix height(n,x-1,z)
h#=get matrix height(n,x,z)
h2#=get matrix height(n,x,z)
rem Calcula ángulo X utilizando alturas
x1#=(x-1)*25.0 : y1#=h#
x2#=(x+0)*25.0 : y2#=h4#
dx#=x2#-x1#
dy#=y2#-y1#
ax#=atanfull(dx#,dy#)
ax#=wrapvalue(90-ax#)
rem Calcula ángulo Z utilizando alturas
z1#=(z-1)*25.0 : y1#=h2#
z2#=(z+0)*25.0 : y2#=h8#
dz#=z2#-z1#
dy#=y2#-y1#
az#=atanfull(dz#,dy#)
az#=wrapvalue(90-az#)
rem Crea normal para el ángulo
nx#=sin(ax#)
ny#=cos(ax#)
nz#=sin(az#)
rem Establecer normal para suavidad
set matrix normal n,x,z,nx#,ny#,nz#
next x
next z
update matrix n
endfunction
_Handle_SelecBox:
if dragbox=1
print "dragbox 1"
print moldx#,"-",moldy#
endif
return
Make_GUI:
load image "gui\statusbar.bmp",100
sprite 1,0,576,100
set sprite 1,0,0
load image "gui\camcontrols\plus.jpg",110
sprite 10,0,445,110
set sprite 10,0,1
load image "gui\camcontrols\minus.jpg",111
sprite 11,0,445,111
set sprite 11,0,1
load image "gui\camcontrols\arrowl.jpg",112
sprite 12,0,445,112
set sprite 12,0,1
load image "gui\camcontrols\arrowr.jpg",113
sprite 13,0,445,113
set sprite 13,0,1
load image "gui\mouse.bmp",200
return
Rem *** Returns true if the four coordinates vary enough to qualify
Rem *** as a mouse selection box
Function Dragging(x1,y1,x2,y2)
If (Abs(x1 - x2)>3) Or (Abs(y1-y2)>3)
i = 1
Else
i = 0
EndIf
EndFunction i
Rem *** Draw a box given two sets of coordinates
Function DrawBox(firstx,firsty,lastx,lasty)
ink rgb(0,255,0),rgb(0,0,0)
line firstx,firsty,firstx,lasty
line lastx,firsty,lastx,lasty
line firstx,firsty,lastx,firsty
line firstx,lasty,lastx,lasty
EndFunction
Function Tilt(MatNum,Obj,LimbObj,a#,x#,z#,foot#)
ta#=wrapvalue(a#-45)
frontleftx#=newxvalue(x#,ta#,foot#)
frontleftz#=newzvalue(z#,ta#,foot#)
ta#=wrapvalue(a#+45)
frontrightx#=newxvalue(x#,ta#,foot#)
frontrightz#=newzvalue(z#,ta#,foot#)
ta#=wrapvalue(a#+225)
backleftx#=newxvalue(x#,ta#,foot#)
backleftz#=newzvalue(z#,ta#,foot#)
ta#=wrapvalue(a#+135)
backrightx#=newxvalue(x#,ta#,foot#)
backrightz#=newzvalue(z#,ta#,foot#)
rem Calculate degree of tilting from corner heights
frontlefth#=get ground height(MatNum,frontleftx#-mx#,frontleftz#-mz#)
frontrighth#=get ground height(MatNum,frontrightx#-mx#,frontrightz#-mz#)
backlefth#=get ground height(MatNum,backleftx#-mx#,backleftz#-mz#)
backrighth#=get ground height(MatNum,backrightx#-mx#,backrightz#-mz#)
across#=((frontrighth#-frontlefth#)+(backrighth#-backlefth#))/2.0
length#=((backlefth#-frontlefth#)+(backrighth#-frontrighth#))/2.0
rem Update tank model
h#=get ground height(MatNum,x#-mx#,z#-mz#)
trackh#=(frontlefth#+frontrighth#+backlefth#+backrighth#)/4.0
if trackh#>h# then h#=trackh#
position object LimbObj,x#,h#,z#
pitch object up LimbObj,90
move object LimbObj,5
pitch object down LimbObj,90
yrotate object LimbObj,a#
rotate object Obj,wrapvalue(length#/1.5),0,wrapvalue(across#/1.5)
EndFunction
`OIS (Object In Screen) function by DARKGuy
`If you're going to use it then give me some credits :)
function OIS(obj,inner,outer)
if object screen x(obj)>inner
if object screen x(obj)<(screen width()+outer)
if object screen y(obj)>inner
if object screen y(obj)<(screen height()+outer)
exitfunction 1
else
exitfunction 0
endif
else
exitfunction 0
endif
else
exitfunction 0
endif
else
exitfunction 0
endif
endfunction
rem *** Returns True (1) if the specified team member has been clicked
Function ClickedOnObject(xclick,yclick,t)
if object exist(t)=0 then exitfunction
xpos = object screen x(t)
ypos = object screen y(t)
If (Abs(xpos-xclick) < 20) And (Abs(ypos-yclick) < 20)
i = 1
else
i = 0
EndIf
EndFunction i
Rem *** Returns true if the specified team member lies within a given box
Function IsInBox(firstx,firsty,lastx,lasty,t)
if object exist(t)=0 then exitfunction
xpos = object screen x(t)
ypos = object screen y(t)
if xpos > firstx and xpos < lastx or xpos > lastx and xpos < firstx
if ypos > firsty and ypos < lasty or ypos > lasty and ypos < firsty
i = 1
else
i = 0
endif
else
i = 0
endif
EndFunction i
function Selectt(obj)
if object exist(obj+2000)=1 then delete object obj+2000
make object plain obj+2000,80,15
color object obj+2000,rgb(0,255,0)
Selected(obj-2000)=1
PositionHealthBar(obj,UnitOffset(obj-2000))
` position object obj+2000,object position x(obj),object position y(obj)+60,object position z(obj)
endfunction
Function DeSelect(t)
if object exist(t+2000) then delete object t+2000
rem *** Setting this variable lets us know the unit is deselected
Selected(t-2000)=0
EndFunction
Function DeSelectAll()
for t=2000 to 2000+MaxUnit(0)
if object exist(t+2000)=1 then delete object t+2000
rem *** Setting this variable lets us know the unit is deselected
Selected(t-2000)=0
next t
EndFunction
rem *** Move all the selected units to the given coordinates
Function SetupMove(X#,Y#,top6)
SumX# = 0
SumY# = 0
Total = 0
rem *** For each tank...
For i = 0 to MaxUnit(0)
rem *** If the tank is selected...
If Selected(i)=1
rem *** Then add its position to the total
SumX# = SumX# + Object Position X(i+2000)
SumY# = SumY# + Object Position Z(i+2000)
Total = Total + 1
EndIf
Next i
rem *** If at least one tank was selected...
If Total > 0
rem *** then calculate the average of all selected tank positions.
MeanX# = SumX# / Total
MeanY# = SumY# / Total
rem *** For each selected tank...
For i = 0 to MaxUnit(0)
If Selected(i) = 1
rem *** Calculate its target position as an offset from the average.
rem *** This allows the tanks to automatically move in formation.
Go_ToX(i) = MatrixLimit(X# + (Object Position X(i+2000) - MeanX#))
Go_ToY(i) = MatrixLimit(Y# + (Object Position Z(i+2000) - MeanY#))
rem *** And use the "Point" command to point the tank in the direction
rem *** of its target.
if object exist(i+5000)=1
delete object i+5000
make object cube i+5000,1
goto nxt1
endif
if object exist(i+5000)=0
make object cube i+5000,1
goto nxt1
endif
nxt1:
Point Object i+5000, Go_ToX(i), 40 , Go_ToY(i)
EndIf
Next i
EndIf
rem *** Start the "tank moving" sound
EndFunction
rem *** Don't let the tanks move off the matrix edge
Function MatrixLimit(X#)
I = X#
If I < 50 Then I = 50
If I > 9500 Then I = 9500
EndFunction I
Rem *** Detects whether any of the tanks are colliding with each other
Function Colliding(ObjID,top)
i = 0
x = Object Position X(ObjID)
z = Object Position Z(ObjID)
For j = 2000 to 2000+top
If j <> ObjID
if object exist(ObjID)=0 then goto kkk1
if object exist(j)=0 then goto kkk1
x1 = Object Position X(j)
z1 = Object Position Z(j)
xdiff = x-x1
zdiff = z-z1
If Sqrt((xdiff*xdiff)+(zdiff*zdiff)) < 180
i = 1
Exit
EndIf
EndIf
kkk1:
next j
EndFunction i
Rem *** Stops the specified tank in its tracks (ha ha ha)
Function Halt(ObjID)
if object exist(ObjID)=0 then exitfunction
Go_toX(ObjID-2000)=0
Go_toY(ObjID-2000)=0
`Hit(ObjID)=0
EndFunction
rem *** Position the health bar on the tank
Function PositionHealthBar(ObjID,offset)
if object exist(objid)=0 then exitfunction
if object exist(objid+2000)=0 then exitfunction
Set Object To Camera Orientation ObjID+2000
Position Object ObjID+2000, Object Position X(ObjID), Object Position Y(ObjID)+offset, Object Position Z(ObjID)
EndFunction
moving:
Moving = 0
rem *** process what happens when the tanks are moving
For i = 0 To MaxUnits
If (Go_ToX(i) > 0) Or (Go_ToY(i) > 0)
rem *** move forward, then back if we hit something
Move Object 2000+i,5
If Colliding(i+2000,MaxUnits)=True
Move Object 2000+i,-5
` Hit(i) = Hit(i) + 1
` If Hit(i) > 30
` Halt(i)
` EndIf
EndIf
rem *** position the health bar for each tank
` PositionHealthBar(i+5)
rem *** stop the tank if it's within 6 world units of its final
rem *** destination
For j = 0 to MaxUnits
If (Go_ToX(j) > 0) Or (Go_ToY(j) > 0)
dx# = Abs(Go_ToX(j) - Object Position X(j+2000))
dz# = Abs(Go_ToY(j) - Object Position Z(j+2000))
If (dx# < 6) And (dz# < 6)
Halt(j)
EndIf
EndIf
Next j
EndIf
Next i
remstart
rem *** How many tanks are still moving?
T = TotalMoving(topunit)
rem *** If none, turn down the sound
If (T = 0) And (Sound Looping(TankMoving)=1)
Volume = Get Sound Volume(TankMoving)
If Volume > 3
Set Sound Volume TankMoving, Volume - 1
Else
Stop Sound TankMoving
EndIf
Else
rem *** Otherwise, set the sound volume according to the number
rem *** of tanks visible on screen.
Set Sound Volume TankMoving, 60+(TotalMovingOnScreen(top5)*10)
EndIf
remend
return
rem *** Select a specific member of the team
rem *** and deselect everyone else
Function SelectOnly(t,top2)
DeselectAll()
Selectt(t)
If shiftkey() <> 1
For i = 2000 To 2000+top2
If i <> t then DeSelect(i)
Next i
EndIf
EndFunction
:: Pentium 300 Mhz, old 8Mb video card, 64Mb RAM, 5 gb & 1.6 gb HD's, W98 SE, Sound Blaster AWE 32 ::