Hello, My name is Joe and I am very new to the map editor and have a question with the triggers for my map.
I am making a TD/Survival map but i cannot figure out how to make an option box. I want to make a box that pops up with two[2] clickable options. option 1 would run trigger 1 for the TD and option 2 would run trigger 1 for the survival part of the map. I know it is possible and probably very easy i am just missing it and any help would be awesome. I am taking a class in college where this map is part of my final project (we got to pick which game we could make a custom in).
In the starcraft 2 map editor these are called dialogs (the background for menus) and dialog items which you attach to dialogs (which include buttons, images, text boxes etcetc).
Awesome thanks guys it helped a ton but i am getting a trigger error that i cannot seem to solve. When i use the action hide dialog box for all players i get the following error...
"Set trigger error in 'gt_selection_func': could not get triggerDialog from parameter in DialogsetimageVisible (value:0) near line 97 in gt_selection_func() in mapScript_galaxy"
Ive tried 2 different ways to hide the dialog box, Ive hidden the buttons then the box. Ive tried hiding the background for the box but that didn't seem to work either. Any suggestions/ideas???
Welcome to sc2mapster! Feel free to send me a PM if you have any questions or concerns :)
This error means that you're trying to hide the dialog box, but it can't find the dialog that you're asking it to hide. My guess is that you used "Triggering Dialog" or "Last Created Dialog" here, which would cause this error.
If that's the case, you'll need to assign your dialog to a global variable, and then reference that variable later. For example:
// Dialog Creation TriggerCreateDialogwithoffsets(whatever)anchoredto(whatever)withsize(whatever)// You already did this partSetVariable(MyDialogVariable)toDialog(LastCreatedDialog)// This is the line you need to add, so sc2 can remember which dialog is which for later// Now when you need to hide the dialog... (Hide)Dialog(MyDialogVaraible)forplayers(AllPlayers)// We tell it to hide the dialog we saved in the variable earlier
If you can't figure it out, please post a screenshot of your trigger. It's a bit tricky to diagnose the problem without seeing the trigger itself.
Thank you very much that solved my error. I had referenced the dialog before but when i was trying to hide it I forgot to select the variable, i just had it at last created.
Thanks again.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello, My name is Joe and I am very new to the map editor and have a question with the triggers for my map.
I am making a TD/Survival map but i cannot figure out how to make an option box. I want to make a box that pops up with two[2] clickable options. option 1 would run trigger 1 for the TD and option 2 would run trigger 1 for the survival part of the map. I know it is possible and probably very easy i am just missing it and any help would be awesome. I am taking a class in college where this map is part of my final project (we got to pick which game we could make a custom in).
@KillerJoe1273: Go
In the starcraft 2 map editor these are called dialogs (the background for menus) and dialog items which you attach to dialogs (which include buttons, images, text boxes etcetc).
Happy googling -> http://lmgtfy.com/?q=starcraft+2+galaxy+editor+dialog+tutorial
:)
@KillerJoe1273: Go
I'd suggest you to read this tutorial :) http://www.thehelper.net/threads/triggers-a-beginners-guide-to-dialogs.149621/
Awesome thanks guys it helped a ton but i am getting a trigger error that i cannot seem to solve. When i use the action hide dialog box for all players i get the following error...
"Set trigger error in 'gt_selection_func': could not get triggerDialog from parameter in DialogsetimageVisible (value:0) near line 97 in gt_selection_func() in mapScript_galaxy"
Ive tried 2 different ways to hide the dialog box, Ive hidden the buttons then the box. Ive tried hiding the background for the box but that didn't seem to work either. Any suggestions/ideas???
Welcome to sc2mapster! Feel free to send me a PM if you have any questions or concerns :)
This error means that you're trying to hide the dialog box, but it can't find the dialog that you're asking it to hide. My guess is that you used "Triggering Dialog" or "Last Created Dialog" here, which would cause this error.
If that's the case, you'll need to assign your dialog to a global variable, and then reference that variable later. For example:
If you can't figure it out, please post a screenshot of your trigger. It's a bit tricky to diagnose the problem without seeing the trigger itself.
Thank you very much that solved my error. I had referenced the dialog before but when i was trying to hide it I forgot to select the variable, i just had it at last created.
Thanks again.