Hello, I am trying to play a certain sound upon opening a container i'm importing into the game.
However, I don't really know how to do this. Currently I am doing the following but to no avail:
config.cpp
bagsounds.sqf
Everything else about my object works as it should and acts as a proper container: I just cannot figure out how to play these sounds to the player locally upon opening or closing the bag. Any help is appreciated.
That's rather a subject for this section.
anyway, your params is wrong. params needs local variables, not the stringed object itself.
params ["_cont"];
if (_cont == simc_a5_container) then {playSound "bagopen"};
(i supposed simc_a5_container is an object, not a class)