Ok this is quite the jump from a warcraft 3 dialog system, especially considering the capabilities of this editor.
I am now making a dialog for my maps Civilization Trait selection,my goal is to create a list of civilizations at the start of the game that players can select from before the game actually starts.
I have gone as far as building the basis of the dialog box
Dialog-CreateaModaldialogofsize(300,500)at(0,50)relativetoTopLeftofscreenVariable-SetMyDialog=(Lastcreateddialog)Dialog-CreateabuttonfordialogMyDialogwiththedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,50)settingthetooltipto"Click this button to become a produ..."withbuttontext"Productive"andthehoverimagesetto""Dialog-CreateabuttonfordialogMyDialogwiththedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,100)settingthetooltipto"Click this button to become a Indus..."withbuttontext"Industrial"andthehoverimagesetto""Dialog-CreateabuttonfordialogMyDialogwiththedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,150)settingthetooltipto"Click this button to become a Creat..."withbuttontext"Creative"andthehoverimagesetto""Dialog-CreateabuttonfordialogMyDialogwiththedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,200)settingthetooltipto"Click this button to become an Aggr..."withbuttontext"Aggressive"andthehoverimagesetto""Dialog-CreateabuttonfordialogMyDialogwiththedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,250)settingthetooltipto"Click this button to become an Defe..."withbuttontext"Defensive"andthehoverimagesetto""Dialog-CreateabuttonfordialogMyDialogwiththedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,300)settingthetooltipto"Click this button to become an Econ..."withbuttontext"Economic"andthehoverimagesetto""Dialog-CreateabuttonfordialogMyDialogwiththedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,350)settingthetooltipto"Click this button to become an Subt..."withbuttontext"Subtle"andthehoverimagesetto""Dialog-CreateabuttonfordialogMyDialogwiththedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,400)settingthetooltipto"Click this button to become an Hono..."withbuttontext"Honorable"andthehoverimagesetto""Dialog-ShowMyDialogfor(Allplayers)
Now I'm not sure if this is the cleanest way for the selection, but I'm still learning how this editor does it's thing.
I'm going to need another dialog representing an integer showing how many choices the players have left, I'm going to work with 3 for right now until I change it down the line. So I'm guessing I will need to make another dialog with an item that's changed via a global variable.
Now since I'm new with dialogs, I'm wondering if there's anything I should do to make these cleaner or neater, again I'm trying to make sure this project is as clean as I can make it, my old maps back on warcraft 3 were cluttered with experimental triggers that ended up pummeling the thing into the ground with memory leaks, I want to try and keep things on the simple and easy to fix level.
First off, memory leaks are no longer an issue (well, mostly) in Starcraft II, so you shouldn't ever have to worry about that.
You're going to want to make sure you create a variable for each Dialog Item you create (or just create an Array), so that you can have specific 'A Dialog Button is pressed' responses.
In addition, you could have it so that, when a player selects a certain civilization (i.e. an Industrial civilization), the selected civilization's button will disappear from each player's dialog box.
I figured the leaks would be mostly gone, especially after noticing alot of the changes with the trigger editor, Local variables being in the GUI, Player variables use playerid by default, alot of stuff is more streamlined and cleaner.
Still I want to keep the clutter to a minimal level.
As for the dialogs, I have been creating variables for each one and am in the process of testing each individual one for their functionality.
They are working as intended and with alot of trial and error I'm getting the results I need.
For a dialog with two buttons you need - I would suggest putting this all in its own folder on the trigger list
(Global Variables) 1 dialog variable, 2 dialog item variables , 1 Functions (action) for creating dialog, 1 trigger that handles the dialog button clicks
Function (Create Dialog)
- Create new Dialog
- Set Dialog Variable = last created dialog
- Create new dialog Item(button) -with text "button 1"
- Set Dialog item variable1 = last created dialog item
- Create new dialog Item(button) -with text "button 2"
- Set Dialog item variable2 = last created dialog item
- Show Dialog Variable to all players
Trigger (Dialog Button Clicked)
Event- Any user clicks any dialog item(button)
Conditions- OR( (clicked dialog item = Dialog item variable1 )(clicked dialog item = Dialog item variable1))
Actions -
switch ( Clicked Dialog Item)
-if (clicked dialog item = Dialog item variable1 )
- Do stuff for button 1
-if (clicked dialog item = Dialog item variable2 )
- Do stuff for button 2
Thats about as simple as it gets
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
I'm trying to make 2 buttons I'm having some problem to get my buttons work correctly. I'm trying to do exactly same as SouLCarveRR but I can't find all triggers. Would be great if someone can link that kind thing as a map file so I can copy more easily, thanks!
Ok this is quite the jump from a warcraft 3 dialog system, especially considering the capabilities of this editor.
I am now making a dialog for my maps Civilization Trait selection,my goal is to create a list of civilizations at the start of the game that players can select from before the game actually starts.
I have gone as far as building the basis of the dialog box
Now I'm not sure if this is the cleanest way for the selection, but I'm still learning how this editor does it's thing.
I'm going to need another dialog representing an integer showing how many choices the players have left, I'm going to work with 3 for right now until I change it down the line. So I'm guessing I will need to make another dialog with an item that's changed via a global variable.
Now since I'm new with dialogs, I'm wondering if there's anything I should do to make these cleaner or neater, again I'm trying to make sure this project is as clean as I can make it, my old maps back on warcraft 3 were cluttered with experimental triggers that ended up pummeling the thing into the ground with memory leaks, I want to try and keep things on the simple and easy to fix level.
First off, memory leaks are no longer an issue (well, mostly) in Starcraft II, so you shouldn't ever have to worry about that.
You're going to want to make sure you create a variable for each Dialog Item you create (or just create an Array), so that you can have specific 'A Dialog Button is pressed' responses.
In addition, you could have it so that, when a player selects a certain civilization (i.e. an Industrial civilization), the selected civilization's button will disappear from each player's dialog box.
@Beasttamer: Go
I figured the leaks would be mostly gone, especially after noticing alot of the changes with the trigger editor, Local variables being in the GUI, Player variables use playerid by default, alot of stuff is more streamlined and cleaner.
Still I want to keep the clutter to a minimal level.
As for the dialogs, I have been creating variables for each one and am in the process of testing each individual one for their functionality.
They are working as intended and with alot of trial and error I'm getting the results I need.
I have to say this was easier than I expected.
For a dialog with two buttons you need - I would suggest putting this all in its own folder on the trigger list
(Global Variables) 1 dialog variable, 2 dialog item variables , 1 Functions (action) for creating dialog, 1 trigger that handles the dialog button clicks
Function (Create Dialog)
- Create new Dialog
- Set Dialog Variable = last created dialog
- Create new dialog Item(button) -with text "button 1"
- Set Dialog item variable1 = last created dialog item
- Create new dialog Item(button) -with text "button 2"
- Set Dialog item variable2 = last created dialog item
- Show Dialog Variable to all players
Trigger (Dialog Button Clicked)
Event- Any user clicks any dialog item(button)
Conditions- OR( (clicked dialog item = Dialog item variable1 )(clicked dialog item = Dialog item variable1))
Actions -
switch ( Clicked Dialog Item)
-if (clicked dialog item = Dialog item variable1 )
- Do stuff for button 1
-if (clicked dialog item = Dialog item variable2 )
- Do stuff for button 2
Thats about as simple as it gets
I'm trying to make 2 buttons I'm having some problem to get my buttons work correctly. I'm trying to do exactly same as SouLCarveRR but I can't find all triggers. Would be great if someone can link that kind thing as a map file so I can copy more easily, thanks!
Problem solved by myself =)