Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Totally profesional experianced cogger problem.
Totally profesional experianced cogger problem.
2002-01-25, 6:13 PM #1
Can somebody make me a cog that plays a sound in a sector looping, that goes ON TOP of the sector sound i have set up? Thank you, you will get credit.
2002-01-26, 7:36 AM #2
Not possible. At least, not without cheating:

1) The verb to use sector sounds, 'Sectorsound()', will replace the sector sound when used.

2) Using 'Playsoundatpos(Wav, Getsectorcenter(Sector), 1.0, -1, 100, 1); would work, but the sound would play in the sorrounding sectors as well.

This is cheating:

Code:
#01/2002 GBK
Symbols
Message Startup
Message Entered
Message Exited
Thing Player    Local
Sector Sec
Sound Loop
Int Channel=-1   Local
End
Code
Startup:
Player = JKgetlocalplayer();
If(Getthingsector(Player) == Sec) {
Channel = Playsoundthing(Loop, Player, 1.0, -1, 20, 1); }
Stop;
Entered:
If(Getsenderref() != Sec) Stop;
Channel = Playsoundthing(Loop, Player, 1.0, -1, 20, 1);
Stop;
Exited:
If(Getsenderref() != Sec) Stop;
Stopsound(Channel, 0.1);
Stop;
End


That plays the sound right on top of the player, but only when he is in the appropriet sector.


NOTE: This cog might not function properly in MP.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2002-01-26, 10:12 AM #3
Actually, im going to use sounds coming from ghost positions.

↑ Up to the top!