I have been trying to add a limb to animated object, and it worked fine, but when I try to store checklist quantity in a variable, so that I can access this limb data later, it just fails... What could be the problem with that? It does occur with simple cube too. Here is the code showing problem:
set window on
set window layout 1,1,1
set window title "add limb"
show window
VSync = 1
SM_CXSCREEN = 0
SM_CYSCREEN = 1
load dll "user32.dll",1
PixelsX=call dll(1,"GetSystemMetrics",SM_CXSCREEN)
PixelsY=call dll(1,"GetSystemMetrics",SM_CYSCREEN)
delete dll 1
Set Display Mode PixelsX,PixelsY,32,VSync
set window size 1000, 700
set window position 10, 10
sync on
sync rate 60
sync sleep 1
autocam off
set camera range 1,10000
set normalization on
make object cube 1, 2
position object 1, 0, 0, 0
make object cube 2, 1
make mesh from object 1, 2
delete object 2
perform checklist for object limbs 1
`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`this works
`add limb 1, checklist quantity() ,1
`offset limb 1, checklist quantity(), 0, 0, 1
`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`this doesn't
limNum as integer=checklist quantity()
add limb 1, limNum ,1
offset limb 1, limNum, 0, 0, 1
`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
position camera 5, 5, 5
point camera 0, 2, 0
DO
sync
LOOP
Join The dark Side! We have cookies
