Hi all, i have been trying to use the call function for object group function from matrix1 utils and keep getting an error, my function requires an input variable and i cant figure out how to get the command to use one.
here is an example outlining what i mean
Rem Project: Dark Basic Pro Project
Rem Created: Sunday, February 24, 2013
Rem ***** Main Source File *****
grass = 1
shrubs =2
trees = 3
for x = 1 to 3
batchload((x*1000)-999,x*1000,x)
next x
sync on
sync rate 60
autocam off
backdrop on
color backdrop 0
sync
sync
do
control camera using arrowkeys 0,5,2
if KEYSTATE(2) = 1 then rot = grass
if KEYSTATE(3) = 1 then rot = shrubs
if KEYSTATE(4) = 1 then rot = trees
if mouseclick() = 1 then chosen = pick object(screen width()/2, screen height()/2,1,10000000)
text 0,0,str$(chosen)
if chosen >0 then chosen2 = object group(chosen)
text 0,20,str$(chosen2)
`********************************************************************
call function for object group rot,rotate(object)
`********************************************************************
sync
loop
function rotate(object)
//print object
//sync
//wait key
yrotate object object,object angle y(object)+1
endfunction object
function batchload(omin,omax,groupno)
for x = omin to omax
make object cube x,10
position object x,rnd(2000),0,rnd(2000)
place object in group x,groupno
next x
endfunction
how to i make the command insert the groupobject number into my function?
cheers
kezzla
I'm not a complete idiot -- Some parts are just missing.