Author Topic: Blender weapon animation  (Read 1384 times)

I'm trying to get animation working on blender 2.49b

(CLICK FOR BIGGER)


The sequence is called firecrackerReady and is called in the script here:

Code: [Select]

        stateName[2]                             = "Charge";
stateTransitionOnTimeout[2]    = "Armed";
stateTimeoutValue[2]                 = 0.8;
stateWaitForTimeout[2]    = false;
stateTransitionOnTriggerUp[2] = "AbortCharge";
stateScript[2]                  = "onCharge";
stateAllowImageChange[2]        = false;
};

function firecrackerImage::onCharge(%this, %obj, %slot)
{
   %obj.playthread(2, firecrackerReady);
}

function firecrackerImage::onAbortCharge(%this, %obj, %slot)
{
%obj.playthread(2, root);
}

The export settings:


I can't seem to find out what the problem is, I have parented the model to the bone of the armature and animated the bone.
When I'm in-game, the animation does not play when the weapon is charged.

Any help is appreciated. Thanks.

Well you're trying to play fireCrackerReady and the two animation sequences I see are Charge and fireCrackerThrow. Last I checked Ready !$= Throw

Well you're trying to play fireCrackerReady and the two animation sequences I see are Charge and fireCrackerThrow. Last I checked Ready !$= Throw
oh sorry i cut that part out, even after re-naming these parts within the script; the animation won't play. (updated code below)
Code: [Select]
function firecrackerImage::onAbortCharge(%this, %obj, %slot)
{
%obj.playthread(2, root);
}

function firecrackerImage::onCharge(%this, %obj, %slot)
{
   %obj.playthread(2, firecrackerThrow);
}

function firecrackerImage::onFire(%this, %obj, %slot)
{
%obj.playthread(2, firecrackerThrow);
Parent::onFire(%this, %obj, %slot);
}

Also I believe those animations are playing on the character itself, and I can tell you the default Blockland characters don't have those animations. Have you tried using %this instead?

Also I believe those animations are playing on the character itself, and I can tell you the default Blockland characters don't have those animations. Have you tried using %this instead?
I'll have a go, thanks.
Edit: I solved the problem of the animation!
By using:
Code: [Select]
stateSequence[2] = "firecrackerThrow";in the states of the weapon.
Using %this did not work unfortunately, thanks for the help though!
« Last Edit: October 29, 2014, 03:48:58 PM by alex dude »