Playing instrument only once

I’m working on a piece of coursework and am having a problem playing one part of a recurring event only once.

I have an event for when a player picks up/switches to a weapon and as part of the event, I want a VO line to trigger only the first time the player collects the weapon. The other event is a gun-cocking sound, which I want to play every time.

I have created a local parameter (“Triggered Y/N”), which is changed to “Y” by a command instrument when the event plays.

The VO line I want to play once is located in the parameter sheet for Triggered “N”.

So when the event is first played, it sets the parameter to Y and then logically the VO line shouldn’t play again when the event is triggered. However, this isn’t working! Any ideas why?

I’ve experimented with using trigger conditions rather than the parameter sheet, with no luck.

Thanks

Probably because you’re triggering a new instance each time, which has its parameter values by default.

Thanks. Is there a solution to this within FMOD? I’ve tried using parameter defaults and command instruments to set the parameter…

No, there’s no communication between instances. You could eventually make your parameter global, but that would work only for one player/character.