Author Topic: How do i use the Hammer's explosion datablock AND it's explosion sound?  (Read 2131 times)

I'm trying to give my weapon the Hammer's explosion datablock, but it doesn't give my weapon the Hammer's 'clink' explosion sound, adding in a sound datablock named hammerExplosion with the hammerHit sound doesn't work, is there a way i can remedy this? Also, since i'm using the default wrench model, it uses the 'armattack' animation, but does the default wrench model have it's animation coded into the DTS? Because while it does the 'armattack' animation, it also does what looks like the wrenching animation, if it's coded in the DTS, i'm assuming there's nothing i can do about this?

I'm pretty sure the hammer's 'clink' sound is in the image script rather than the explosion datablock.

The wrench doesn't use 'armattack'. It uses an animation called 'wrench'

It's in the player's animations.

from: TSShapeConstructor(mDts)
   sequence35 = "base/data/shapes/player/m_wrench.dsq wrench";

along with armattack:
   sequence16 = "base/data/shapes/player/m_armAttack.dsq armAttack";

If the clink sound is in the image script, wouldn't the sound play whether you hit something or not?

Also, i used the Sword as a base for the weapon, so it has the armattack and root animation cues
Code: [Select]
function mwrenchImage::onPreFire(%this, %obj, %slot)
{
%obj.playthread(2, armattack);
}

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



I don't know if it's something in the state scripts that activates the animation like 'onFire' or whatever, but it does the wrench's animation in first person only, it does only the arm attack animation in third person

The wrench's animation is that it goes a 90 degrees forward whereas the other animation is just the Blockhead lowering it's arm while holding the wrench in place

The default tools have built-in first person animations and I don't know why.

I was hoping i wasn't right when i thought that the wrench animation was in the DTS itself :(

Anyway, any ideas to how i can get the projectile hit sound working?