Uh oh. Looks like this post got lost.
There are 2 string varaibles stored on some of the CEP objects if they have a sound associated with the activate and deactiveate animations. And yes you can play whatever sound you want. It doesn't have to be the one already stored on the object. And of course you could also use the zep_onoff script for non-CEP objects that have animations and put the sound variables on them as well.
So if you store a string variable on the object (in the toolset), CEP_L_SOUND1 | string | as_an_catmeow1 , when you activate the object the "as_an_catmeow1" sound will play.
If you store the string variable, CEP_L_SOUND2 | string | as_an_catmeow2 , when you deactivate the object this sound would play.
These are one time sounds though since it is using the PlaySound function. If you want a sound to keep playing/looping when you activate an item you will need to place a sound object and then turn the sound on when the object is activated using the SoundObjectPlay function and off when deactivated using the SoundObjectStop function. You could easily alter the zep_onoff script to use this method as well. But this time the string variable
CEP_L_SOUND1 would be the TAG of the object that is being activated/deactivated and you wouldn't need to put in anything for CEP_L_SOUND2. That script would look like so:
void main()
{
string sSound1 = GetLocalString(OBJECT_SELF, "CEP_L_SOUND1");
object oSound1 = GetObjectByTag(sSound1);
if (GetLocalInt(OBJECT_SELF,"CEP_L_AMION") == 0)
{
object oSelf = OBJECT_SELF;
SoundObjectPlay(oSound1);
DelayCommand(0.1, PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
SetLocalInt(OBJECT_SELF,"CEP_L_AMION",1);
}
else
{
object oSelf = OBJECT_SELF;
SoundObjectStop(oSound1);
//If problems stopping the sound uncomment the line below. Know bug.
//DelayCommand(0.1, SoundObjectStop(oSound1));
DelayCommand(0.1, PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalInt(OBJECT_SELF,"CEP_L_AMION",0);
}
}
Hope that made sense.