Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-26-2003, 03:57 AM
marcoR marcoR is offline
Registered User
Join Date: Jul 2003
Posts: 1,349
marcoR is on a distinguished road
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...
__________________
If this is your account, contact me.
- loriel
email, jabber: [email protected]
icq: 67530805
aim: lorielvictrix
Reply With Quote
  #2  
Old 08-26-2003, 04:19 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
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.
__________________
Reply With Quote
  #3  
Old 08-26-2003, 04:25 AM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
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.
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #4  
Old 08-26-2003, 04:38 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
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.
__________________
Reply With Quote
  #5  
Old 08-26-2003, 03:21 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
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?
Reply With Quote
  #6  
Old 08-26-2003, 03:37 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
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...
Reply With Quote
  #7  
Old 08-26-2003, 03:41 PM
GrowlZ1010 GrowlZ1010 is offline
defunct
Join Date: May 2002
Posts: 187
GrowlZ1010 is on a distinguished road
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.
Reply With Quote
  #8  
Old 08-26-2003, 08:22 PM
marcoR marcoR is offline
Registered User
Join Date: Jul 2003
Posts: 1,349
marcoR is on a distinguished road
well, then I invite you all to make some cool sound effects using whatever method works best for you, and perhaps something will begin.
__________________
If this is your account, contact me.
- loriel
email, jabber: [email protected]
icq: 67530805
aim: lorielvictrix
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:57 AM.


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