Chunking and sound
chimeric
Member Posts: 1,163
I would like to prevent the body fall sound when a creature gets chunked. Any way to do that? A trigger for permanent death? It happens under -10 hp, doesn't it? Or at -10 hp?
0
Comments
It's coded to Opcode 13*0x8, Kill target: Exploding.
-20 hp is the threshold
Only Crushing, Slashing, and Piercing will chunk.
Cold and Magic Cold will Freeze.
Other damage types cause a normal death.
You can:
While you can change a creatures sounds with: SetPlayerSound(Object,strref,sndslot), there isn't a slot that corresponds to the fall sound slot.
You would likely have to remove the entry from every INI file, then add it back in with opcode 174 as a contingent effect for every creature. A script won't trigger fast enough(and is a terrible place for this anyway) - the sound happens well after the body hits the floor. So it will have to be opcode 232, condition #16. In the spell to be cast, precede the Play Sound effect with Opcode 318: STATE bitequal STATE_EXPLODING_DEATH(0x100), you'll have to add a new entry for it, there is no Statecheck entry in SPLPROT by default.
So every .INI would have need:
REPLACE_TEXTUALLY ~fall=.*~ ~fall=~
Every .CRE would need:
LPF ADD_CRE_EFFECT INT_VAR opcode = 232 parameter2 = 16 timing = 9 STR_VAR resource = EVAL ~%SUBSPELL%~ END
SPLPROT.2da would need: I would name the subspells after the sound files they are to play, so an otherwise empty spell "FAL_01B.SPL":
That said, your method with PlaySound() may be the way to go, unless I can remove or silence creatures somehow when they die. Thanks.
Edit: Silence works to remove the fall thud with a cleaned-up INI. Now I just need some contingency or script check to silence a creature at -20 hp.
Edit-edit: Actually, nothing, not even a contingency, is quick enough if it triggers after death. It takes it a full second to get going, much too late for sound or silence.
Which creatures, you say, don't play the fall sound? Are you serious? That's like buying a new car when you don't like the old paint.
Say, you don't happen to know what spell the engine applies to chunk creatures, do you? It probably does that with a spell, just as cloning for Project Image with SIMULACR.SPL and the others. People have figured out which spells were used there, I wonder how?
There is still a lot that is applied directly by the engine, without a resource.
For how I intend to stop the thuds, everything I've tried for blocking the sound is either too slow or object-specific. I think I'm going to go with invisible minions and silencing LastSummonerOf(Myself).