Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
LazyPitbull
Beginner


Joined: 15 Dec 2001
Posts: 19
Location: USA

PostPosted: Thu Jan 03, 2002 2:31 pm   

Triggered sound help..
 
How do I make it so that when Gandalf receives a tell a beeping sound or any sound I choose will go off when someone gives me a tell. The text that it looks like for this mud is Jigglypuff tells you, 'blahblahblah' Thanks in advance for help :)
Reply with quote
LazyPitbull
Beginner


Joined: 15 Dec 2001
Posts: 19
Location: USA

PostPosted: Thu Jan 03, 2002 3:35 pm   
 
Is there anyway to make it do a random sound that I have in zmud folder to? I have 4 Simpsons sounds and everytime someone gives me a tell I want it to play any of the 4 sounds at random
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jan 03, 2002 4:06 pm   
 
For a beep, you can use the #BEEP command along with a trigger on tells.

#TR {tells you} {#BEEP}

For random sounds, you'll probably need to combine the #PLAY command with the %random function.

LightBulb
Reply with quote
LazyPitbull
Beginner


Joined: 15 Dec 2001
Posts: 19
Location: USA

PostPosted: Thu Jan 03, 2002 4:10 pm   
 
Is this the correct code for random stuff?
#TR {tells you} {#PLAY %random}
Reply with quote
Crymson4
Novice


Joined: 20 Nov 2001
Posts: 35
Location: USA

PostPosted: Thu Jan 03, 2002 4:55 pm   
 
Almost. You'd need to assign each sound to a specific variable (i.e. Sound1, Sound2, etc etc.)

The correct syntax for %rand is

#PLAY %rand(@Sound1,@Sound2,@Sound3,@Sound4)

I could be a little off, again, I'm not sitting right in front of it. I seem to remember using something similar for some randon text messages I'm using. Check the helpfiles, that's where I found it.

-=Crymson

Someone once said "Don't try to be a great man, just be a man; and let history draw it's own conclusions.".
Reply with quote
bgunther
Novice


Joined: 20 Dec 2001
Posts: 39
Location: USA

PostPosted: Thu Jan 03, 2002 5:04 pm   
 
You could probably do this:

#tr {tells you} {#var sound %case(%rand(1,4),sound1.wav,sound2.wav,sound3.wav,sound4.wav);#play @sound}

I haven't tried that, but I think it would work... you would need to replace sound1.wav etc with the actual wav files you wanted. Also... the above should be all on one line, it got separated by the word wrapping.




Bob, aka Kayd on SWMud and a few others.
Reply with quote
Crymson4
Novice


Joined: 20 Nov 2001
Posts: 35
Location: USA

PostPosted: Fri Jan 04, 2002 5:02 pm   
 
Yeah, that's right, didn't assign a VAR. Your syntax is much more correct. Jeez, I miss my computer. (In the repair shop) It's amazing how much about zmud syntax I forget when I'm not looking at it. :)

*inno*

-=Crymson

Someone once said "Don't try to be a great man, just be a man; and let history draw it's own conclusions.".
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Jan 05, 2002 5:22 pm   
 
Nothing to apologize for, Crymson. Lazy could look up the correct syntax for himself if he cared to, but his name is obviously accurate.

LightBulb
All scripts untested unless otherwise noted
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net