Hi I\'m trying to load a player object and a gun object and then attach the gun using the limb cammand but it keeps telling me that it needs to be added in sequence.
How can I find out how many limbs the original object has?
I originaly used this peice of code but it doesnt print anything.
sync on : sync rate 60 : hide mouse:cls 0
perform checklist for object limbs ObjectNumber
for c=1 to checklist quantity()
print checklist string$(c)
next c
while mouseclick()=0
sync
endwhile
end
Here is my program
Rem Project: Limb Creation
Rem Created: Sunday, January 12, 2014
Rem ***** Main Source File *****
sync on
autocam off
sync rate 120
hide mouse
set display mode 1024,768,32
set ambient light 25
color backdrop 0, rgb(0,0,0)
speed#=1
cameraheight=30
cameraangle=20
load object \"TF341_03B.X\",1
load image \"TF341_03_1_D.dds\",1
texture object 1,1
SET OBJECT FRAME 1,1970
scale object 1,50,50,50
position object 1,0,-20,0
\'SET OBJECT SPEED 1,1
\'loop object 1
load object \"m203m4acg.x\",2
load image \"m4m203vw_D.dds\",2
texture object 2,2
zrotate object 2,90
fix object pivot 2
scale object 2,50,50,50
position object 2,-4.09999895096,4.67001199722,-4.67001199722
make mesh from object 1,2
add limb 1,1,1
`recalcbounds=1
`offset limb 1,1,-10,0,0,recalcbounds
`hide limb 2,1
position camera object position x(1)-30,object position y(1)+cameraheight,object position z(1)-30
point camera object position x(1),object position y(1)+cameraangle,object position z(1)
make light 1
position light 1,0,-50,-20
`POINT LIGHT 1, object position x(1), object position y(1),object position Z(1)
do
gosub setview
`gosub moveweapon
`gosub animationspeed
`gosub inputcheck
`gosub Information
gosub Information2
sync
LOOP
end
moveweapon:
if keystate(77) then inc x#,0.01
if keystate(75) then dec x#,0.01
if keystate(78) then inc y#,0.01
if keystate(74) then dec y#,0.01
if keystate(72) then inc z#,0.01
if keystate(80) then dec z#,0.01
position object 2,x#,y#,z#
return
setview:
if keystate(2)=1
position camera object position x(1),object position y(1)+cameraheight,object position z(1)+30
point camera object position x(1),object position y(1)+cameraangle,object position z(1)
endif
if keystate(3)=1
position camera object position x(1),object position y(1)+cameraheight,object position z(1)-30
point camera object position x(1),object position y(1)+cameraangle,object position z(1)
endif
if keystate(4)=1
position camera object position x(1)-30,object position y(1)+cameraheight,object position z(1)-30
point camera object position x(1),object position y(1)+cameraangle,object position z(1)
endif
if keystate(5)=1
position camera object position x(1)+30,object position y(1)+cameraheight,object position z(1)-30
point camera object position x(1),object position y(1)+cameraangle,object position z(1)
endif
if keystate(6)=1
position camera object position x(1),object position y(1)+50,object position z(1)-15
point camera object position x(1),object position y(1),object position z(1)
endif
return
animationspeed:
if upkey()=1
inc speed#,0.2
SET OBJECT SPEED 1,speed#
endif
if downkey()=1
dec speed#,0.2
SET OBJECT SPEED 1,speed#
endif
return
inputcheck:
if keystate(17)=1 then loop object 1,1600,5500 `Walking W
if keystate(57)=1 then loop object 1,1970,1986 `running Spacbar
if Keystate(25)=1 then loop object 1,0,5500 ` Play All P
if keystate(38)=1 then loop object 1,762,781 `move left L
if keystate(19)=1 then loop object 1,782,801 `move right R
if keystate(23)=1 then loop object 1,611,635 `idle
return
Information:
set cursor 80,0
Print \"Use Up & Down Arrows to Increase & Decrease Speed\"
set cursor 200,20
print \"Animation Frame = \" + Str$(INT(OBJECT FRAME(1)))
set cursor 200,30
print \"Animation Speed = \" + STR$(INT(speed#))
set cursor 200,40
print \"Frame Rate = \" + str$ ( screen fps ( ) )
print \"\"
return
Information2:
set cursor 0,0
print \"weopen x position\" + STR$(x#)
print \"weopen y position\" + STR$(y#)
print \"weopen z position\" + STR$(y#)
return
"There are no perfect ideas only perfect intentions"