Blockland Forums > Modification Help
Death Animations
Amade:
use YourDatablockNameHere::onDisabled(%data, %obj, %enabled) instead, so it works on bots using your datablock and not just players. (It would also probably solve your problem.)
Chao:
Ok Amade, I did what you said, but It just did the same thing as when I started.
This is the code I used this time:
--- Code: ---package fixanim
{
function OrangeMushroomArmor::onDisabled(%data, %obj, %enabled)
{
Parent::onDisabled(%data, %obj, %enabled);
%obj.playthread(0, root);
}
};
activatepackage(fixanim);
--- End code ---
I also tried replacing
--- Code: ---%obj.playthread(0, root);
--- End code ---
with
--- Code: ---%obj.playthread(0, death1);
--- End code ---
But it still just played both the running and death thread when I died when I was running.
Amade:
Try using %obj.setVelocity("0 0 0");
Space Guy:
Set the death animation so it doesn't blend with others, perhaps. It's an option in the DTS exporter usually.
Chao:
I'm using this, but it's not working:
--- Code: ---package fixanim
{
function OrangeMushroomArmor::onDisabled(%data, %obj, %enabled)
{
Parent::onDisabled(%data, %obj, %enabled);
%obj.playthread(0, root);
%obj.setVelocity("0 0 0");
}
};
activatepackage(fixanim);
--- End code ---
Also, Space Guy, there is a blend option, but I turned it off.