Author Topic: Sword based weapons animations?  (Read 2363 times)

Whenever i try to make a sword-like weapon, the animation goes ka-boom. Any hint on how to fix this?


Do you mean the way the arm goes  up and down? If so, use this (Just put it in bottom of file and change the name):

Code: [Select]
function YourImage::onPreFire(%this, %obj, %slot)
{
%obj.playthread(2, armattack);
}

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

Great! But, since i'm basically just modifying the sword script, shouldn't that already be in there?

ARGHH BUMP It's not working.

*forced to bump AGAIN*

Great! But, since i'm basically just modifying the sword script, shouldn't that already be in there?
If it's not in there the game will do the command off the parent object or WeaponData.....I'm not a weapon expert, but I'm pretty sure I'm atleast partically right.


If the command is given in the usage listing, but the command isn't given, the command off the parent object the weapon is based off of it used.

He's saying that if you have a weapon that extends or whatever another weapon, and you call a command on it, if you didn't redefine that command, it will use the one from the parent.

You need to link to those methods through the StateManager of the Weapon Image. For example:

Code: [Select]
stateScript[2] = "onPreFire";