Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   sound (https://forums.graalonline.com/forums/showthread.php?t=47482)

marcoR 08-26-2003 03:57 AM

sound
 
I know how to play files, but.. this is the question:
when you use your sword, and someone is far away, they don't hear it as loud as tho you were close, does this work with sound effects too? I know midi's are the whole level.. but are WAV's like the sword? if so you could make some really interesting NPC's that play a file and spun around the player, etc, etc. I'd like to know, before I try...

Kaimetsu 08-26-2003 04:19 AM

As far as I know, all sounds played in ganis are treated as though they originate from the centre of the gani. Sounds played via the 'play' command don't have positions, so there're no volume modifications.

Tseng 08-26-2003 04:25 AM

Quote:

Originally posted by Kaimetsu
As far as I know, all sounds played in ganis are treated as though they originate from the centre of the gani. Sounds played via the 'play' command don't have positions, so there're no volume modifications.
Well, you can drag the sound around in the gani editor - I believe that changes the point they originate from.

Kaimetsu 08-26-2003 04:38 AM

Quote:

Originally posted by Tseng
Well, you can drag the sound around in the gani editor - I believe that changes the point they originate from.
Ah, that must be a new feature, if only relative to the last Graalshop version I used.

Loriel 08-26-2003 03:21 PM

Quote:

Originally posted by Kaimetsu
Sounds played via the 'play' command don't have positions, so there're no volume modifications.
Are you sure they do not get assigned the NPC's position?

Python523 08-26-2003 03:37 PM

Quote:

Originally posted by Loriel
Are you sure they do not get assigned the NPC's position?
there's a play2 for the point where it plays from I believe, but I would think play would get the assigned NPC's position as well... if only we weren't too lazy to test...:(

GrowlZ1010 08-26-2003 03:41 PM

Hm. On my sound card, at least, Loriel is quite right. In weapons, however, it just plays the sound full volume.

Try this script if you want to see how your computer handles Graal's sounds and distances.

NPC Code:

//#CLIENTSIDE
if (playerenters || timeout){
swordplay={int(random(0,63)),int(random(0,63))};
message sword sound played from #v(swordplay[0]),#v(swordplay[1]) with play2: bomyload0 sound played using play;
play bomyload0.wav;
play2 sword.wav,swordplay[0],swordplay[1],1;
timeout = 0.5;
}



You'll notice that play2 lets you control whereabouts a sound is being played from. Play does seem to take the position of the NPC.

marcoR 08-26-2003 08:22 PM

well, then I invite you all to make some cool sound effects using whatever method works best for you, and perhaps something will begin.


All times are GMT +2. The time now is 05:46 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.