In your BP you have some kind of ‘play sound’ node when the gun is fired.
Just change that to check if the supressor is attached or not. If it is, play the supressed sound instead.
In your BP you have some kind of ‘play sound’ node when the gun is fired.
Just change that to check if the supressor is attached or not. If it is, play the supressed sound instead.
Hello, i have a problem to add for the weapon attachment a silenced sound for the supressor whe in i fire. How can i fire a normal sound for fire an the silenced soun d for the supressor when i attach the supressor on the weapon. I am Searching for houers but couldnt find any solution or tutorial for that.
hello, thanks for the answer. i have no problem to fire the sound as silenced or normal shoot sound to play the sound. the problem is i can not switch between these sounds.
Example: attach the gun> play normal shoot sound
attach the supressor to the gun > play the silenced sound an when i deselct the supressor play the normal shoot sound as before.
i am not the fitest two programm such a logic inside a bp. i set something from a tutorial from you tube up. but in this tutorial it plays the same sound only the volume is changing when fireing the weapon when the supressor is attached. 1 for normal shoot an 0,2 for the supressor shoot. i have some supressor sounds from the marketplace and i was trying to set them inside up for the supressor when it is attached at the weapon.
its not that easy for me. but thanks anyway.
Ok, show me the code you have to make the gun fire normally.
One Pic is from the Weapon. And the other from the character
Anytime i attach the supressor the shoot sound get played from silenced an from normal shoot. I dont know how i can code this.
Ok, looks good actually. But where’s the bit where you call the fire event?
thank you for look in. i will test it this evening. thank you very mutch.
Hello, youre code works fine , i set it up in the assault rifle an not in the character. Thank you . works great now.
The first screenshot actually doesn’t look good to me. As I understand, several attachments may be present simultaneously, hence the array. And it means that the macro executes its outputs several times. In my opinion, what needs to be done is you check if any of the attachments is a suppressor, and execute the macro outputs only by the Loop Completed pin, and not by the the Loop Body pin. Something like this:
i dont know where do you know it but it workes perfect now. Thank you very mutch.
If possible, I’d recommend an event-based approach: when the player adds or removes a suppressor, just change one variable that is responsible for the shot sound. Because you’ll only have to run the code once in a while, and not every shot. Although it isn’t a very complex macro, running it dozens of times per minute isn’t efficient.