Well, I have an object (.3ds file) that has 10 frames of animation.
I have it attatched to the player as a limb.
Here is the code (Using my common test project):
SYNC ON:SYNC RATE 0:AUTOCAM OFF
MAKE OBJECT SPHERE 1, 10
Color Object 1, RGB(255, 255, 0)
SET OBJECT COLLISION ON 1
MAKE MATRIX 1,1000,1000,10,10
POSITION MATRIX 1,-500,0,-500
MAKE OBJECT BOX 2,100,20,10
POSITION OBJECT 2,0,-25,50 ; Color Object 2, RGB(255, 100, 50)
SET OBJECT COLLISION ON 2
MAKE OBJECT BOX 6,100,2,300
POSITION OBJECT 6,0,-25,0
Color Object 6, RGB(255, 100, 100)
SET OBJECT COLLISION ON 6
MAKE OBJECT BOX 7,30000,2,30000
POSITION OBJECT 7,0,-200,0
Color Object 7, RGB(0, 0, 0)
Set object transparency 1, 100
SET OBJECT COLLISION ON 6
MAKE OBJECT SPHERE 3, 10
Color object 3, RGB(255, 0, 0)
Position object 3, -25, 100, 15
MAKE OBJECT SPHERE 4, 10
Color object 4, RGB(255, 0, 0)
Position object 4, -25, 100, 15
MAKE OBJECT SPHERE 5, 10
Color object 5, RGB(255, 0, 0)
Position object 5, -25, 100, 15
LOAD OBJECT "Sword.3ds", 7500
Color object 7500, RGB(10, 10, 10)
MAKE MESH FROM OBJECT 1,7500
ADD LIMB 1,1,1
HIDE OBJECT 7500
Rotate limb 1, 1, -90, 0, 0
offset limb 1, 1, 4.5, 0, 2.5
DO
If falling#=0 then move object 3, 0.3
If falling#=0 then Point object 3, ox#, oy#, oz#
falling#=1
ox# = OBJECT POSITION X(1)
oy# = OBJECT POSITION Y(1)
oz# = OBJECT POSITION Z(1)
POSITION CAMERA ox#+10,oy#+20,oz#+5
POINT CAMERA ox#, oy#, oz#
MOVE CAMERA -50
if upkey()=1 then move object 1, 0.05
if rightkey()=1 then turn object right 1, 0.5
if leftkey()=1 then turn object left 1, 0.5
`--------------------------------------------------
if controlkey()=1 then play object 7500, 1, 10
`This might animate the object if it wasn't hidden, but
`won't animate the limb.
`--------------------------------------------------
move object down 1, 0.098
move object down 3, 0
IF OBJECT COLLISION(1,2) THEN POSITION OBJECT 1, ox#,object position y(1),oz#
If object collision(1, 3) then move object 3, -0.1
If object collision(1, 7) then position object 1, 0, 0, 0
If object collision(1, 6) then POSITION OBJECT 1, object position x(1),oy#,object position z(1)
If object collision(3, 6) then move object up 3, 0.098
If object collision(3, 6) then falling#=0
SYNC
LOOP
Won't work unless you have the .3ds file.
Attatched is the .3ds file (I don't care if you steal it, there is no license).
Put it in your projects folder for the game to work.
How can I get the limb to play like it would if it was just an object?
EDIT: I just tried removing the hide object command on the sword, didn't even animate the sword.
How can I get objects animating?
The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight. 4. "The Doctor" for best time travel machine.