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
zema
Wanderer


Joined: 22 Jun 2005
Posts: 79

PostPosted: Mon Sep 14, 2009 1:18 am   

Buttons! And music! Oh my!
 
Ok basically i am being silly, and trying to make a toggle button to turn/off battle music during combat this is my code. Also i am assuming the first
box you put the code would be the off state, and the 2nd is the on state. The music won't fire off so i am assuming i am doing something wrong.

-Button name FF1- off state (also assming #stop does not stop music files if someone can give me the right command to do so i would appreate that)
#stop ff1battl.mid

-Button state on
#TRIGGER {You attack} {#PLAY ff1battl.mid}

I want to make 3 or 4 buttons so i can turn off/on combat music basically from different games. But i want the triggers to stay within the buttons of course
so i have control to turn the music off if it starts to drive me nuts.
_________________
There are 3 things i hate kids, animals, and women with attitudes..
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Mon Sep 14, 2009 3:00 am   
 
Really, you want to use the #MEDIA command. #PLAY will be what you want to use to start it. Hopefully that'll help you out some. Also, unless the files are in CMUD's sound directory (you can set it under Preferences->Sounds) then the music won't play because the file isn't there. You can do it like #PLAY "C:\My Music\Battle\ff1battl.mid" though.

Charneus
Reply with quote
zema
Wanderer


Joined: 22 Jun 2005
Posts: 79

PostPosted: Mon Sep 14, 2009 12:18 pm   Actually
 
I forgot to mention i also made the sound folder and put all the music files in i do have some sounds working but they go off whenever someone talks in the guild channel.
The only way i can think of doing this is put the trigger for the music insid a class folder and make the button turn the class on or off.

Edit- I got it working using classes, but the media stop command is not working i get an error message. I am assuming that command only works if you have a cd in the drive,
but again if your playing media off of a sound folder is there a command to stop the media if it's playing?
_________________
There are 3 things i hate kids, animals, and women with attitudes..
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Sep 14, 2009 5:14 pm   
 
I believe that:

#PLAY off

will turn off the current sound file that is playing.
Reply with quote
zema
Wanderer


Joined: 22 Jun 2005
Posts: 79

PostPosted: Mon Sep 14, 2009 7:33 pm   indeed
 
Thanks zugg..just so you know i do check the help files, and would like to note that command is not listed in the #PLAY help file. That is all.
_________________
There are 3 things i hate kids, animals, and women with attitudes..
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