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 → Adjoin Past Sound Global
Adjoin Past Sound Global
2004-05-19, 5:19 PM #1
I need a cog that creates a sound (in that one area) when an adjoin is passed. please make the cog be worthy to hear on the hosts and joiners computers because it is multiplayer. Its easy to get a cog that plays a sound when you go through an adjoin, but having it in one area (where the adjoin is) stumps me, perhaps i could use a ghost(s) and have where the ghost(s) location be where the sound plays. Have it play every time the surface is crossed!

Thanks Very Much!

------------------
Your Owners Clan Leaader,
_yo_wasup_

[This message has been edited by YourOwners (edited May 19, 2004).]
-=__/¯¯l¤¥Ø¤l¯¯\__\/\/ª≤uÞ_=-
http://www.TeamYo.org
2004-05-20, 11:16 AM #2
Here ya go. Just input the adjoins and a sound and this cog is ready to go. No need for any ghost objects, as the sound is played at the center of the adjoin [http://forums.massassi.net/html/smile.gif].

Code:
# Jedi Knight Cog Script
#
# Plays a sound at an adjoin when that adjoin is crossed.
#
# [Darth Slaw]
# 5/20/04
# =============================================================
symbols

message    crossed

surface    adjoin
surface    adjoin2

sound      sound0

flex       vol=1.0           local
flex       minrad=2.0        local
flex       maxrad=8.0        local

end

code

crossed:
	if(GetSenderRef() != adjoin && GetSenderRef() != adjoin2) return;
	PlaySoundPos(sound0, GetSurfaceCenter(adjoin), vol, minrad, maxrad, 0x0);
	PlaySoundPos(sound0, GetSurfaceCenter(adjoin2), vol, minrad, maxrad, 0x0);

Return;

end


------------------
for(i = 0; i < 00; i = i + 1) Print("massassi is good");
PrintInt(i); //print the integer value of infinity
May the mass times acceleration be with you.
2004-05-22, 4:47 PM #3
Thx darth, I added you to the credits. thx, your a good cog creater.

------------------
Your Owners Clan Leaader,
_yo_wasup_
-=__/¯¯l¤¥Ø¤l¯¯\__\/\/ª≤uÞ_=-
http://www.TeamYo.org

↑ Up to the top!