| 08-27-2003, 08:45 PM | #1 |
Hia all, I'm doing a TD map, but I'm having some problems with my Dialog Buttons to choose wich race to be. I can make one work for one player. But not for the rest (6 players total) If I try to make a seperate dialog window for the other players (With new variables) it still doesn't work. Also, if I have the second menu enabled, the first menu won't work. Here is a layout: Menu should show like this: Pick your Race: race1 race2 race3 race4 race5 If one is clicked, it closes the window, and creates x number of units for that player at his/her starting location. This actually works for player one, as said, but no more than one. Anyone have any ideas on how to do this? Thanks in advance.://// |
| 08-27-2003, 10:29 PM | #2 |
Little bump :mtk: |
| 08-27-2003, 10:32 PM | #3 |
If you make a different menu for other players (all new variables), and then display it to only one player per menu, it will work. |
| 08-27-2003, 11:03 PM | #4 |
I tried that, just added a _2 to every variable, but it doesn't want to react..somehow. I edited the other triggers to focus on the _2 variables. Might have done something wrong, I'll take a look at it again, in my mind, that would be logical too...soo :P I'll try |
| 08-27-2003, 11:22 PM | #5 |
It's hard to diagnose a trigger when we can't see the trigger. Right click it and click copy as text then paste it in here. |
| 08-27-2003, 11:34 PM | #6 |
hehe, didn't know u could do that :P Ok, here goes: ------This is creation of the menu for red------- Event: Time - Elapsed game time is 1.00 seconds Conditions: none Actions: Dialog - Change the title of Start_Dialog to Select your Race: Dialog - Create a dialog button for Start_Dialog labelled |cffFFFF00xxxx|r Set Dialog_Btn[1] = (Last created dialog Button) Dialog - Create a dialog button for Start_Dialog labelled |cff996633xxxx|r Set Dialog_Btn[2] = (Last created dialog Button) Dialog - Create a dialog button for Start_Dialog labelled |cffCCFFFFxxxx|r Set Dialog_Btn[3] = (Last created dialog Button) Dialog - Create a dialog button for Start_Dialog labelled |cff0000FFxxxx|r Set Dialog_Btn[4] = (Last created dialog Button) Dialog - Show Start_Dialog for Player 1 (Red) -----This is the execution of commands when menu button is clicked----------- Event: Dialog - A dialog button is clicked for Start_Dialog Conditions: (Clicked dialog button) Equal to Dialog_Btn[1] Actions Unit - Create 1 xxxx Builder for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees Unit - Create 1 xxxx for Player 1 (Red) at (Random point in Left side xxxx <gen>) facing Default building facing degrees Trigger - Run Show Race Chosen xxxx <gen> (checking conditions) Dialog - Hide Start_Dialog for Player 1 (Red) -----One of thoes pr. race / menu button-------- -----The last "run show race chosen xxxx <gen> trigger----- Event: Conditions: Actions: Game - Display to (All players) for 5.00 seconds the text: (((Name of Player 1 (Red)) + has chosen: ) + |cffFFFF00xxxx|r) I then made one like this for each other color, but since that didn't just work, I tried to make another with different variables, as explained earlier, but it doesn't seem to work either... Hope that makes bit more sence :) |
| 08-27-2003, 11:36 PM | #7 |
Does the menu show up at first; for all of the triggers running after the first, put hide dialog as the very action. |
| 08-27-2003, 11:40 PM | #8 |
Yes, the menu shows, and it works, but only for red. You click the race, and it creates the units. But if I implement more menus, it screws up both the first and the second... What do u mean with "put hide dialog as the very action." ? |
| 08-27-2003, 11:46 PM | #9 |
I mean for the first trigger aciton, have it hide the dialog (instead of that being the last action on the list). Maybe you could post what you have for Player 2? |
| 08-27-2003, 11:55 PM | #10 |
Sure, lemme round it up, but it's basicaly the same as above, with minor changes...I'll see what I can do. Ahh, What I thought u ment, but didn't get it fully :P lol |
| 08-27-2003, 11:58 PM | #11 |
------This is creation of the menu for red------- Event: Time - Elapsed game time is 1.00 seconds Conditions: none Actions: Dialog - Change the title of Start_Dialog_2 to Select your Race: Dialog - Create a dialog button for Start_Dialog_2 labelled |cffFFFF00xxxx|r Set Dialog_Btn_2[1] = (Last created dialog Button) Dialog - Create a dialog button for Start_Dialog labelled |cff996633xxxx|r Set Dialog_Btn_2[2] = (Last created dialog Button) Dialog - Create a dialog button for Start_Dialog labelled |cffCCFFFFxxxx|r Set Dialog_Btn_2[3] = (Last created dialog Button) Dialog - Create a dialog button for Start_Dialog labelled |cff0000FFxxxx|r Set Dialog_Btn_2[4] = (Last created dialog Button) Dialog - Show Start_Dialog for Player 2 (Blue) -----This is the execution of commands when menu button is clicked----------- Event: Dialog - A dialog button is clicked for Start_Dialog_2 Conditions: (Clicked dialog button) Equal to Dialog_Btn_2[1] Actions Unit - Create 1 xxxx Builder for Player 2 (Blue) at (Player 2 (Blue) start location) facing Default building facing degrees Unit - Create 1 xxxx for Player 2 (Blue) at (Random point in Left side xxxx <gen> ) facing Default building facing degrees Trigger - Run Show Race Chosen xxxx copy <gen> (checking conditions) Dialog - Hide Start_Dialog_2 for Player 2 (Blue) -----One of thoes pr. race / menu button-------- -----The last "run show race chosen xxxx copy <gen> trigger----- Event: Conditions: Actions: Game - Display to (All players) for 5.00 seconds the text: (((Name of Player 2 (Blue)) + has chosen: ) + |cffFFFF00xxxx|r) That is basicaly it, as u can see, all that is changed is the Variables for Start_Dialog_2 and Dialog_Btn_2. That should do it, but it doesn't... |
| 08-28-2003, 12:13 AM | #12 |
wow.... Think we nailed it. Just tried to move the hide trigger, and it FRIKKIN WORKS!!!!!!!!!!!!!! :) To everyone: Have a lookout for United People TD soon, a Shadow Production :) Thanks for ur help Draco :) |
| 08-29-2003, 02:47 AM | #13 |
Guest | That is a very easy question. That is a good but obvious question. Make the one menu then do this trigger: Player Group: Pick every play in (All Players) and do (Dialog- Show Dialog Menu for (Picked Player) Good luck in the future! :D |
| 08-29-2003, 02:50 AM | #14 | |
Quote:
No problemo. Also, keep in mind that you shouldn't ever clear a dialog unless all your triggers running it are done. DOing so will remove which button was last clicked on the dialog as well as the dialog title, buttons, etc. :D |
