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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Fallen.Anvil
Novice


Joined: 12 Jul 2012
Posts: 47

PostPosted: Wed Jul 25, 2012 5:32 pm   

Sound questions
 
Can I use a trigger to have Cmud play a MP3 track for a specified number of seconds?

Alias:
Watch>

Result:
play c:\music\song1 for 10 seconds.

If volume control is available that would be great as well.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Jul 25, 2012 5:41 pm   
 
look up the #PLAY command. If you want to turn it off after a set number of seconds, you will need to use some kind of timer to turn it off with #PLAY OFF.

I don't believe there is any way to control the volume within Cmud.
Reply with quote
Fallen.Anvil
Novice


Joined: 12 Jul 2012
Posts: 47

PostPosted: Wed Jul 25, 2012 5:47 pm   
 
I don't understand how timers work. Can you provide a bare bones example so I can learn from it by tinkering with it?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Jul 25, 2012 7:50 pm   
 
Here is an alias that should do approximately what you want. Treat this as an example and adjust as you wish. Warning--I'm not at home so I have not tested this code:
Code:
#ALIAS song {$sound = "c:\music\song1"; #PLAY $sound; #ALARM songstop {+10} {#PLAY off}}
Reply with quote
Fallen.Anvil
Novice


Joined: 12 Jul 2012
Posts: 47

PostPosted: Thu Jul 26, 2012 9:36 pm   
 
I haven't had time to test it yet but thank you kindly.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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