SYNC ON : SYNC RATE 0 : AUTOCAM OFF : HIDE MOUSE
MAKE OBJECT box 1,200,20,300
limbs() ` Call the function using it's name, not gosub
rotate object 1,0,60,0
POSITION CAMERA 0,200,-300
POINT CAMERA 0,0,0
DO
IF UPKEY()=1 THEN MOVE OBJECT 1,1
IF DOWNKEY()=1 THEN MOVE OBJECT 1,1
IF RIGHTKEY()=1 THEN TURN OBJECT RIGHT 1,.5
IF LEFTKEY()=1 THEN TURN OBJECT LEFT 1,.5
SYNC
LOOP
Function limbs
MAKE OBJECT BOX 2,200,100,100
MAKE MESH FROM OBJECT 1,2
DELETE OBJECT 2
ADD LIMB 1,1,1
DELETE MESH 1
OFFSET LIMB 1,1,0,50,-100
MAKE OBJECT box 2,200,118,1
MAKE MESH FROM OBJECT 1,2
DELETE OBJECT 2
ADD LIMB 1,2,1
DELETE MESH 1
OFFSET LIMB 1,2,0,50,110
rotate limb 1,2,-45,0,0
MAKE OBJECT box 2,200,84,1
MAKE MESH FROM OBJECT 1,2
DELETE OBJECT 2
ADD LIMB 1,3,1
DELETE MESH 1
OFFSET LIMB 1,3,0,50,68
rotate limb 1,3,180,0,0
MAKE OBJECT triangle 2,0,84,0,0,0,0,0,0,84
MAKE MESH FROM OBJECT 1,2
ADD LIMB 1,4,1
OFFSET LIMB 1,4,-100,9,68
DELETE OBJECT 2
ADD LIMB 1,5,1
DELETE MESH 1
OFFSET LIMB 1,5,100,9,68
rotate limb 1,5,-90,180,0
MAKE OBJECT BOX 2,20,50,140
MAKE MESH FROM OBJECT 1,2
DELETE OBJECT 2
ADD LIMB 1,6,1
ADD LIMB 1,7,1
DELETE MESH 1
OFFSET LIMB 1,6,90,20,0
OFFSET LIMB 1,7,-90,20,0
for i = 0 to 7
SET LIMB NORMALS 1,i
next
EndFunction
See the loop at the end of the function ... BTW, you shouldn't GOSUB to a function name - call the function as I've done in the code. Although DBPro currently allows it, and it is currently safe, there's no guarantee that it will be so in the future.