Collie
Veteran
- Messages
- 9
- Reaction score
- 12
- Points
- 788
Exactly as the title says, I'm trying to get the game to play a specific sound when the player melees with the wolf bow out. I have put the sound in my mod's folders, however I am having difficulties getting the game to recognize that the player is holding the wolfbow. Here is the code I am using:
I know the issue is with the game not recognising that the wolfbow is equipped, as putting a iprintlnbold in along with the sound does not produce any results. In addition, if anyone has any experience with using sounds in mods could you tell me exactly how that works? I want to use sounds more in my mods, but I am unsure if I am doing it right here.
PHP:
function wbowmelee()
{
for(;;)
{
if(self MeleeButtonPressed())
{
if(self getcurrentweapon()=="elemental_bow_wolf_howl")
{
playsoundatposition( "mus_snarl", (0,0,0) );
wait(1.5);
continue;
}
else
{
wait(2);
continue;
}
}
wait(0.05);
}
}