PDA

View Full Version : SM, I need your help!


Whelly
10-06-2003, 12:20 PM
Hey SaberMaster, I'm using your weather cogs, and they rule! They add a ton of atmosphere to my new level. You are the ultimate cogger!

I'm working on a city level, a 'RPG level' you could say. I have set up all the sectors to play a city ambience loop. You know how your weather cogs allow for it turn day and night, and at night it sounds extremely odd when I have loud city ambience playing at night. I was hoping you could help me make a cog that would mute every sector's loop sound when it's night. Or maybe change the sound (add a cricket chirping WAV http://forums.massassi.net/html/smile.gif ). Maybe allow me to input a couple sectors that aren't affected, for underwater sound loops and such.

I suppose you could do the sector flag thing that you did with the wthr_light cog, and change it to a hex number. I dunno, any help would be appreciated.

------------------

lucky_jackpot
10-06-2003, 03:18 PM
Hi there http://forums.massassi.net/html/smile.gif

Well I'm not SaberMaster (wishful thinking http://forums.massassi.net/html/wink.gif ) but I believe that you may find some helpful tidbits for setting sector sounds (via loops and arrays) at this link:

http://forums.massassi.net/html/Forum4/HTML/003874.html

It's a cog that I wrote not too long ago and haven't had any complaints about... http://forums.massassi.net/html/wink.gif

In any case, feel free to post what you have, and us coggers will do our best to iron out the creases http://forums.massassi.net/html/biggrin.gif

-Jackpot

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

Whelly
10-06-2003, 04:07 PM
Hi, lucky_jackpot. Have you seen SM's weather cogs on his website? I need this sector sound loop to associate with the weather cogs. When it becomes night in the game, I want to disable every sector, or close to every sector, sound loop in the level, or perhaps replace with another sound. Is it possible? Would it be difficult to add another cog to the set of weather cogs?

Maybe you wouldn't have to associate the cog with the weather cogs, and just make a seperate cog that has the same timer as the length of day/night.

And lucky_jackpot, I think you're just as good as SM! Keep it up! http://forums.massassi.net/html/smile.gif

------------------

lucky_jackpot
10-07-2003, 06:09 AM
Hi there http://forums.massassi.net/html/smile.gif

I'm at work at the moment, but I'll do my best to have a modified version of the cog script for you by tonight (UK time)...

Just so as I know the specs I'm coding to, do you want to disable/mute all sounds or to actually switch sounds, to another one. It's no more difficult to code, but it's just so as I know which one you'd prefer.

Probably including it in the same cog, would be a good idea so as all the information is centralised, rather than having to send messages to other cogs, would be the best solution (/me goes away and ponders). I'll get back to you... http://forums.massassi.net/html/biggrin.gif

-Jackpot

PS: Alas, I may not be SaberMaster ... but everyone has to have something/someone to aspire to... http://forums.massassi.net/html/wink.gif http://forums.massassi.net/html/biggrin.gif

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

SaberMaster
10-07-2003, 12:40 PM
Hey, I'm glad to see someone using those cogs (and looking at my site http://forums.massassi.net/html/smile.gif).

I think the best way to do what you want is to modify your sector's sound cog. A condition like:

if(GetSectorLight(yourSec) == nightLight) SectorSound(yourSec, otherWav, 1);

Instead of making the sounds loop, play the sound and set a timer for the length of the sound. When the sound ends, the timer message will be called and you can check your sector's light. If the sector has a light value of nightLight, then play a night sound.

Another idea would be to get your sound cog to listen for the lightTrigger - the first param will tell you whether the level is going to day or night. Once you get the trigger, you can stop your looping sound, and then start the night loop.

Either way, if you run into problems post what you have and I'll help you with it. http://forums.massassi.net/html/wink.gif

------------------
Author of the JK DataMaster (http://www.geocities.com/sabersdomain/files.html), Parsec (http://www.geocities.com/sabersdomain/files.html), Scribe (http://www.geocities.com/sabersdomain/files.html), and the EditPlus Cog Files (http://www.geocities.com/sabersdomain/files.html).

Whelly
10-07-2003, 02:44 PM
I've decided it would be better just to mute all the sector loops. Hmm, I dunno what would be better; no sound or the ambience of dogs barking or crickets chirping... man, I couldn't make a decision if my life depended on it.

Yeah, it could be better it the whole thing was muted. Would it be possible to allow me to input a couple sectors that would not be affected by this timer? I could use them so that underwater sound loops would not be affected the timer.

I really don't know anything about cog. SM, do you think you could give me a cog for reference about the whole sound timer thing? Just give me something to look at, and I would appreciate it eternally. Thanks both of you!

------------------

lucky_jackpot
10-08-2003, 01:03 AM
Sorry about the delayed response - family issues (grandparents) arose... http://forums.massassi.net/html/redface.gif http://forums.massassi.net/html/frown.gif

Well it looks like you beat me to it SaberMaster http://forums.massassi.net/html/wink.gif. That said, as they are your cogs, you're the best person to know how to modify them - I thought it was just going to be one long cog I would have to look at, until I downloaded the .zip at work (and forgot to take it home with me - d'oh http://forums.massassi.net/html/redface.gif) but it turns out there's a quite a few integrated cog scripts... http://forums.massassi.net/html/wink.gif

Personally, I think the latter of your proposed solutions would seem more sensible (using the lightTrigger), but I'll have to take the zip file home with me and peruse your work some more http://forums.massassi.net/html/wink.gif ("Internet-at-home" issues at the mo...) lol

But as SaberMaster suggests Whelly, feel free to post what you've got and we'll do our best to debug it for you (...now far be it for me to say that SaberMaster has some buggy code... http://forums.massassi.net/html/wink.gif http://forums.massassi.net/html/biggrin.gif )

-Jackpot

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

Whelly
10-08-2003, 12:59 PM
I'm sorry, but I have no cog to debug. I understand a little about cog, but not enough apparently. I'm sorry http://forums.massassi.net/html/frown.gif I can't even write cog.

------------------


[This message has been edited by Whelly (edited October 08, 2003).]

MysteriousSith
10-08-2003, 01:42 PM
Well Whelly, since you can't write cog, I suggest you learn http://forums.massassi.net/html/wink.gif. Here (http://michaelthompson.org/dj/tacc/ctut/) are some pretty good cog tutorials, and remember, it also helps to learn by looking at other cogs.

------------------
"The quality of the levels you make is determined by the skill of the person not by the editor in which they use!"
-Michael Kyle

[This message has been edited by MysteriousSith (edited October 08, 2003).]

Whelly
10-10-2003, 01:08 PM
Hey MysteriousSith http://forums.massassi.net/html/smile.gif How's it going?

I really don't have time to learn cog. I barely have enough time to make levels. If no one will make it, it won't be a castrophic blunder.

------------------