Who in thier right mind locks a sound? I surely dont!
Oh yeah, the cog...
-
# 10/2001 GBK
Symbols
Message Startup
Message Activated
Message Timer
Surface Switch
Surface Floor
Sound Open
Sound Closed
Flex Countdown
Flex Volume=1.0
Flex Mindist=-1
Flex Maxdist=1.0
End
Code
Startup: Setwallcel(Switch, 0); Return;
Activated: If(Getsenderref() == Switch) { If(Getwallcel(Switch) == 0) { Call Dissappear; } Else If(Getwallcel(Switch) == 1) { Call Appear; } } Return;
Appear: Setfacegeomode(Floor, 0x4); Setsurfaceflags(Floor, 0x5);
Clearadjoinflags(Floor, 0x7); Setadjoinflags(Floor, 0x5); Setwallcel(Switch, 0);
PlaySoundPos(Closed, Surfacecenter(Switch), Volume, Mindist, Maxdist, 0x100); Return;
Dissappear: Setsurfaceflags(Floor, 0x0); Setfacegeomode(Floor, 0x0);
Clearadjoinflags(Floor, 0x5); Setadjoinflags(Floor, 0x7); Setwallcel(Switch, 1);
PlaySoundPos(Open, Surfacecenter(Switch), Volume, Mindist, Maxdist, 0x100); Settimer(Countdown); Return;
Timer: Call Appear; Return;
End
-
Again, it works, I tested it.
The last few variables are for the sounds, mindist & maxdist are just that - the minimum and maximum distances for the sound.
------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.