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 → Problem with Sound cog
Problem with Sound cog
2002-07-01, 2:14 PM #1
Sorry, i know im on a COG forum rampage. That just means you know my level will be good because of al the unique cogs [http://forums.massassi.net/html/smile.gif]

Anyways, i dug up this old cog.

What its supposed to do is play a sound at a ghost position, and it gets softer the farther you go out. But what it does is, play the sound EVERYWHERE, at MAX volume. So wherever i go, i hear the sound.

Can somebody fix it please?


Code:
#03/2002 GBK
Symbols
Message Startup
Thing Pos0
Thing Pos1
Thing Pos2
Thing Pos3
Thing Pos4
Sound Loop
Flex Maxdist=10
End
Code
Startup:
Sleep(1);
For(I=0;I<5;I=I+1) {
Playsoundthing(Loop, Pos0, 1.0, -1, Maxdist*10, 1); }
Stop;
End



------------------
ph34r
2002-07-01, 2:30 PM #2
Try this. Change the flags to 0x41. Lower the distance, you have the distance set to 100 JKUs. I'm not sure, but if you go outside the sound's distance, it gets weaker.

------------------
The Sniper Missions. Current project, The Sniper Missions

[This message has been edited by Descent_pilot (edited July 01, 2002).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-01, 2:47 PM #3
Ok forget it, i found a working cog that does the exact same thing.


IGNORE THIS!!!

------------------
ph34r
2002-07-01, 3:23 PM #4
Im getting all nastalgic... [http://forums.massassi.net/html/smile.gif]

Code:
#03/2002 GBK
Symbols
Message Startup
Thing Pos0
Thing Pos1
Thing Pos2
Thing Pos3
Thing Pos4
Sound Loop
Flex Maxdist=10
End
Code
Startup:
Sleep(1);
For(I=0;I<5;I=I+1)
Playsoundthing(Loop, Pos0, 1.0, 0, Maxdist*10.5, 1);
Stop;
End


I dont see why your getting any problems.. [http://forums.massassi.net/html/confused.gif]

I tweaked the range, Maxdist should now equal JKUs. (The ranging in the 'Playsound' commands isnt in JKU...)

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.


[This message has been edited by GBK (edited July 01, 2002).]
And when the moment is right, I'm gonna fly a kite.
2002-07-01, 4:42 PM #5
No wonder my sounds always came up short.

------------------
The Sniper Missions. Current project, The Sniper Missions
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-01, 5:45 PM #6
rofl, you should see all the GBK cogs i find on my hard drive [http://forums.massassi.net/html/smile.gif]

Since i fixed the sound prob, i might as well turn this into a old cog thread [http://forums.massassi.net/html/smile.gif]

How about these? [http://forums.massassi.net/html/smile.gif]

Code:
# 11/2001 GBK
Symbols
Message Activated
Message Timer
thing Switch
Sector Thrust_sector
Vector Thrust_dir
Flex Thrust_speed
Flex Thrust_time
Sound Thrust_sound
Thing Sound_thing
Flex Sound_dist
Int Channel Local
End
Code
Activated:
If(Getsenderref() == Switch) {
Setwallcel(Switch, 1);
Sectorthrust(Thrust_sector, Thrust_dir, Thrust_speed);
Channel = Playsoundthing(Thrust_sound, Sound_thing, 1.0, -1, Sound_dist, 0x1);
Settimer(Thrust_time);}
Stop;
Timer: 
Setwallcel(Switch, 0);
Setsectorthrust(Thrust_sector, Thrust_dir, 0);
Stopsound(Channel, 0.1);
Stop;
End



Code:
#11/2001 GBK
Symbols
Message Startup
Message Pulse
Surface Wall
Flex Min_val=0.1
Flex Max_val=0.9
Flex R=0 Local
End
Code
Startup:
Setpulse(Rand());
Stop;
Pulse:
R=Rand();
While((R < Min_val) || (R > Max_val)) { R=Rand(); }
Setsurfacelight(Wall, R, 0.1);
Setpulse(Rand());
Stop;
End
2002-07-02, 5:25 AM #7
Those where the days... [http://forums.massassi.net/html/smile.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-07-02, 6:17 AM #8
Where did my reply go? *Looks at GBK*

------------------
The Sniper Missions. Current project, The Sniper Missions
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-02, 8:27 AM #9
What? Why are you looking at me? If your reply was removed, repost it. I didnt remove it.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-07-02, 9:54 AM #10
All I was saying was the type of cog they are (or I think they are). The first looks like a Timed Setcor Thurst cog. The second is a Random Light Pulse Surface cog.

------------------
The Sniper Missions. Current project, The Sniper Missions

[This message has been edited by Descent_pilot (edited July 02, 2002).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-02, 10:07 AM #11
The first one generates sector thrust when a thign is activated.

------------------
ph34r
2002-07-02, 10:19 AM #12
I was close. [http://forums.massassi.net/html/smile.gif]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-02, 11:22 AM #13
Apparently, I originatly wrote it as a surface switch, but someone (a n00b, apparently), modified it to make it a thing. They forgot to remove the surfacecel commands....

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-07-02, 12:26 PM #14
Don't know about you and SaberMaster, but Dash is giving me a headache.

------------------
The Sniper Missions. Current project, The Sniper Missions
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!