Now here's my event that reacts to either Button(Easy, Hard) being clicked:
EventsDialog-AnyDialogItemisusedbyPlayer1witheventtypeClickedLocalVariablesConditions(Useddialogitem)==DialogButtons[1]ActionsVariable-SetLevelVarEasy=1Trigger-RunLevel1Easy(CheckConditions,Don't Wait until it finishes)
& Hard:
EventsDialog-AnyDialogItemisusedbyPlayerAnyPlayerwitheventtypeClickedLocalVariablesConditions(Useddialogitem)==DialogButtons[2]ActionsVariable-SetLevelVarHard=1Trigger-RunLevel1Hard(CheckConditions,Don't Wait until it finishes)
The issue I'm having is that when I press the "Easy" button in-game both Easy and Hard are triggered. And "Hard" does not even work. I don't know how to set the condition properly so that they act independently rather than as a group.
Is my Action Definition incorrect?
What condition should I be using?
this looks like the problem:
Variable - Set DialogButtons[1] = (Last created dialog)
Variable - Set DialogButtons[2] = (Last created dialog)
it looks to me like your trying to set a button to a dialog variable (as it says Last created dialog, and not last created dialog item), make sure the variable DialogButtons are set to "Dialog Item", not "Dialog"
@LinkD: Go
Here is my DialogButtons variable:
DialogButtons = No Dialog Item <Dialog Item[2]>
It is of Type: "Dialog Item" and is an Array with a size of 2.
I don't know if there's anything wrong as far as the variable goes, I'm assuming not. I do however question my use of the condition within this trigger:
I just went and looked at my triggers again and that must have been the issue Wakeman because it's working now. Another issue I ran into was that the 2 buttons I was creating within the same Action Definition needed to each have their own "Dialog - Show (Last created dialog) for (All players)".
I thought the 2 buttons were overlapping before I added a Show last created Dialog for each Button, only 1 button must have been being shown though.
Let me start off by posting my triggers and then explaining my issue(s).
Here's my Action Definition called within my Map Initialization trigger:
Now here's my event that reacts to either Button(Easy, Hard) being clicked:
& Hard:
The issue I'm having is that when I press the "Easy" button in-game both Easy and Hard are triggered. And "Hard" does not even work. I don't know how to set the condition properly so that they act independently rather than as a group.
Is my Action Definition incorrect? What condition should I be using?
I've gotten this far thanks to the help of this thread: http://forums.sc2mapster.com/development/triggers/8103-dialog-button-help/
@Sceltor:
this looks like the problem:
Variable - Set DialogButtons[1] = (Last created dialog)
Variable - Set DialogButtons[2] = (Last created dialog)
it looks to me like your trying to set a button to a dialog variable (as it says Last created dialog, and not last created dialog item), make sure the variable DialogButtons are set to "Dialog Item", not "Dialog"
@LinkD: Go Here is my DialogButtons variable: DialogButtons = No Dialog Item <Dialog Item[2]>
It is of Type: "Dialog Item" and is an Array with a size of 2.
I don't know if there's anything wrong as far as the variable goes, I'm assuming not. I do however question my use of the condition within this trigger:
I don't know where this condition is located:
Variable - Set DialogButtons[1] = (Last created dialog)
Variable - Set DialogButtons[2] = (Last created dialog)
The above lines are wrong, unless they are only typo.
It should be
Variable - Set DialogButtons[1] = (Last created dialog item)
Variable - Set DialogButtons[2] = (Last created dialog item)
I just went and looked at my triggers again and that must have been the issue Wakeman because it's working now. Another issue I ran into was that the 2 buttons I was creating within the same Action Definition needed to each have their own "Dialog - Show (Last created dialog) for (All players)".
I thought the 2 buttons were overlapping before I added a Show last created Dialog for each Button, only 1 button must have been being shown though.
Thanks for your help guys.