Author Topic: overriding equip sound  (Read 674 times)

I'm trying to silence the sound of an item/gun being pulled out of the inventory/mounted

How can I override the equip item sound of a specific item so it silently equips?

Dynamically or just always for that weapons?

If the latter, just find the line in the image datablock that looks something like:

Code: [Select]
stateSound[0] = weaponSwitchSound;
and delete it.


If you are looking to make it dynamic, then just have the image's first state calls a script that only plays the sound when you want it to.
« Last Edit: June 03, 2016, 08:20:34 PM by ArmyUnit »

If you're talking about dropping a tool:

You can, although you may have to do something with serverCmdDropTool(%client, %slotID)
This is how it works:
messageClient(%client, 'MsgItemPickup', '', int slotID, ItemData toolID, bool isSilent);

Example:
0 - First slot from the client's tool HUD
nameToID(GunItem) - Just send tool IDs, as far as I know if you send names it will not work and still think it's not an object since the client doesn't have datablocks named
true - (Can also just be 1, makes the sound silent, they won't know if they have an item or not)

messageClient(%client, 'MsgItemPickup', '', 0, nameToID(GunItem), true);
« Last Edit: June 03, 2016, 08:05:29 PM by Kyuande »

Code: [Select]
stateSound[0] = weaponSwitchSound;
thanks this did the trick