| 12-02-2003, 12:28 AM | #1 |
Okay... im trying to make a dialog button that when a player types in -music it comes up with a dialog button that you can choose wat music you want to play. My trigger is Event - Player - Player 1 (Red) types a chat message containing -music as An exact match Conditions - None Actions - Dialog - Create a dialog button for Music_Dialog_Botton labelled Doom Set Button_1 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Pursuit Theme Set Button_2 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Dark Victory Set Button_3 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Heroic Victory Set Button_4 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Arthas Theme Set Button_5 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Credits Set Button_6 = (Last created dialog Button) The problem is that the dialog will not come up when i type -music... Help Plz |
| 12-02-2003, 12:32 AM | #2 |
you need to go Dialog-Show Dialog ... |
| 12-02-2003, 01:06 AM | #3 |
And don't forget, right before the "show dialog" action you need to add a "change title for dialog." |
| 12-02-2003, 10:44 PM | #4 |
okay... one more thing thats not working... the buttons aren't showing! (I like badgers :cuss:) |
| 12-02-2003, 11:12 PM | #5 |
i like gophers, badgers are ugly. LoL. |
| 12-02-2003, 11:17 PM | #6 |
Squirrels own all... so back to the problem... what is wrong? |
| 12-02-2003, 11:21 PM | #7 |
--Trigger 1--- E: TIme Elapsed .01 seconds C: None A: Dialog - Create a dialog button for Music_Dialog_Botton labelled Doom Set Button_1 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Pursuit Theme Set Button_2 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Dark Victory Set Button_3 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Heroic Victory Set Button_4 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Arthas Theme Set Button_5 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Credits Set Button_6 = (Last created dialog Button) ---Trigger 2--- E: Player 1 (Red) types a chat message containing -music as An exact match Player 2 (Red) types a chat message containing -music as An exact match Player 3 (Red) types a chat message containing -music as An exact match Player 4 (Red) types a chat message containing -music as An exact match Player 5 (Red) types a chat message containing -music as An exact match Player 6 (Red) types a chat message containing -music as An exact match Player 7 (Red) types a chat message containing -music as An exact match Player 8 (Red) types a chat message containing -music as An exact match Player 9 (Red) types a chat message containing -music as An exact match Player 10 (Red) types a chat message containing -music as An exact match Player 11 (Red) types a chat message containing -music as An exact match Player 12 (Red) types a chat message containing -music as An exact match C: None A: Dialog Show Music_Dialog_Botton for Triggering Player BTW that will work for any player |
| 12-04-2003, 02:51 AM | #8 |
OKay... i got all that and made a couple of fixes so that when another sound is picked the last played sound stops... but now whenever I play a sound, all the sounds play... here is my trigger Trigger 1: E: Time - Elapsed game time is 0.01 seconds C: A: Dialog - Show Music_Dialog_Botton for (Triggering player) Dialog - Create a dialog button for Music_Dialog_Botton labelled Doom Set Button_1 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Pursuit Theme Set Button_2 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Dark Victory Set Button_3 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Heroic Victory Set Button_4 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Arthas Theme Set Button_5 = (Last created dialog Button) Dialog - Create a dialog button for Music_Dialog_Botton labelled Credits Set Button_6 = (Last created dialog Button) Trigger 2: E: Events Player - Player 1 (Red) types a chat message containing -music as An exact match Player - Player 2 (Blue) types a chat message containing -music as An exact match Player - Player 3 (Teal) types a chat message containing -music as An exact match Player - Player 4 (Purple) types a chat message containing -music as An exact match Player - Player 5 (Yellow) types a chat message containing -music as An exact match Player - Player 7 (Green) types a chat message containing -music as An exact match Player - Player 8 (Pink) types a chat message containing -music as An exact match Player - Player 9 (Gray) types a chat message containing -music as An exact match Player - Player 10 (Light Blue) types a chat message containing -music as An exact match Player - Player 11 (Dark Green) types a chat message containing -music as An exact match C: A: Actions Dialog - Show Music_Dialog_Botton for (Triggering player) Trigger 3: E: Events Dialog - A dialog button is clicked for Music_Dialog_Botton C: A: Actions Sound - Stop music Immediately If ((Clicked dialog button) Equal to Button_1) then do (Sound - Destroy (Last played sound)) else do (Sound - Play Doom <gen>) If ((Clicked dialog button) Equal to Button_2) then do (Sound - Destroy (Last played sound)) else do (Sound - Play PursuitTheme <gen>) If ((Clicked dialog button) Equal to Button_3) then do (Sound - Destroy (Last played sound)) else do (Sound - Play DarkVictory <gen>) If ((Clicked dialog button) Equal to Button_4) then do (Sound - Destroy (Last played sound)) else do (Sound - Play HeroicVictory <gen>) If ((Clicked dialog button) Equal to Button_5) then do (Sound - Destroy (Last played sound)) else do (Sound - Play ArthasTheme <gen>) If ((Clicked dialog button) Equal to Button_6) then do (Sound - Destroy (Last played sound)) else do (Sound - Play Credits <gen>) Tell me wats wrong... |
| 12-04-2003, 11:59 AM | #9 |
The problem is in trigger 3. All of your if/then/else statments are flawed. You Put all your play actiona after the else statments. Basically this just played all the sounds except the one you picked. Try doing something like this: Actions Sound - Stop music Immediately Sound - Destroy (Last played sound) If ((Clicked dialog button) Equal to Button_1) then do (Sound - Play Doom <gen> ) else do Nothing If ((Clicked dialog button) Equal to Button_2) then do (Sound - Play PursuitTheme <gen> ) else do Nothing If ((Clicked dialog button) Equal to Button_3) then do (Sound - Play DarkVictory <gen> ) else do Nothing If ((Clicked dialog button) Equal to Button_4) then do (Sound - Play HeroicVictory <gen> ) else do Nothing If ((Clicked dialog button) Equal to Button_5) then do (Sound - Play ArthasTheme <gen> ) else do Nothing If ((Clicked dialog button) Equal to Button_6) then do (Sound - Play Credits <gen> ) else do Nothing |
| 12-05-2003, 12:53 AM | #10 |
its still not working... the only problem is that a pick a music to play... then when i pick another one the first picked sound doesn't stop, so the sounds overlap... how do i fix this? |
| 12-05-2003, 12:14 PM | #11 |
apparently i am a moron. The Last created sound could be anything so we'll have to use a variable. Let's call It MUSIC7. It is a sound variable. I would set it up like this. The 2 lines i changed begin with **. Actions Sound - Stop music Immediately **Sound - Destroy (MUSIC7) If ((Clicked dialog button) Equal to Button_1) then do (Sound - Play Doom <gen> ) else do Nothing If ((Clicked dialog button) Equal to Button_2) then do (Sound - Play PursuitTheme <gen> ) else do Nothing If ((Clicked dialog button) Equal to Button_3) then do (Sound - Play DarkVictory <gen> ) else do Nothing If ((Clicked dialog button) Equal to Button_4) then do (Sound - Play HeroicVictory <gen> ) else do Nothing If ((Clicked dialog button) Equal to Button_5) then do (Sound - Play ArthasTheme <gen> ) else do Nothing If ((Clicked dialog button) Equal to Button_6) then do (Sound - Play Credits <gen> ) else do Nothing **Set MUSIC7 = (Last Created Sound) |
