Hey Petter,
There's many ways to do this, but this is definitely possible both using Events or by coding.
If you don't need the granularity between far and close, you can make a Switch, and then set the Switch from either...
- An Event that sets the Switch.
Make a Switch with two switches (far and close), assign the Switch in a Switch Container and then right-click the Switch Container > New Event > Set Switch.
- Or from code like this:
public Ak.Wwise.Switch Switch_Far;
public Ak.Wwise.Switch Switch_Close;
... and then from a function, use the .SetValue(). Just make sure to set the switch before you post the sound itself, and also on the same game object.
There's also more on Switches in the Wwise-301 course.
If you want to learn more about the differences between States, Switches and Game Parameters, try watching this One Minute Wwise video.
Let us know if this helps!