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 → Ghost Sound Cog
Ghost Sound Cog
2004-10-04, 3:25 PM #1
Hey guys, would anyone mind whipping me up a simple cog? Well, I know I've asked for this cog before, but I've lost it, I need a cog that plays a sound (looping) from a ghost position, and gets quieter and quieter as you go away from it..., it's for a part of my level with music in it (cantina), so I want you to be able to faintly here it from outside, I don't feel like setting each sector to have the sound, it wouldn't work right ,and it would be tedious, so if anyone knows how to make a cog like that, would you mind doing it for me? Thanks!
2004-10-04, 6:00 PM #2
Untested, but I think this'll work:
Code:
# ghostsound.cog
# Plays a sound at a ghost position
# ghost = position of sound
# sound = sound to play
# volume = max volume to play sound
# distance = max distance that the sound can be heard
# 10/4/04 Stormtrooper
symbols
message startup
thing ghost
sound sound
flex volume=1
flex distance=1
end
# ===
code
startup:
 PlaySoundThing(sound, ghost, volume, 0, distance, 0x1);
return;
end

↑ Up to the top!