I am having a bit of trouble with my trigger, currently i have a dialog with 3 dialog buttons for a player to select their race. now i made a new dialog for each player (2 just for testing purposes until i know it works) and when player 1 or player 2 picks their race, it stops working and the other cannot. i tried it with destroy all dialogs and all types of different ways, so i reverted back to the way it used to be with destroy all so i can get some input. ill display the code below.
Trigger 1 - Player 1 - Select Race Dialog
Player1-SelectRaceDialogEventsGame-MapinitializationLocalVariablesConditionsActionsDialog-CreateaModaldialogofsize(300,250)at(0,0)relativetoCenterofscreenVariable-SetPlayer1-RaceVar=(Lastcreateddialog)Dialog-Createalabelfordialog(Lastcreateddialog)withthedimensions(200,50)anchoredtoTopLeftwithanoffsetof(60,25)withthetext"Choose Your Race"colorsettoWhitetextwriteoutsettofalsewithawriteoutdurationof2.0Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,50)settingthetooltipto"Select Race Terran"withbuttontext"Terran"andthehoverimagesetto""Variable-SetPlayer1-RaceArray[1]=(Lastcreateddialogitem)Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,100)settingthetooltipto"Select Race Zerg"withbuttontext"Zerg"andthehoverimagesetto""Variable-SetPlayer1-RaceArray[2]=(Lastcreateddialogitem)Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(200,50)anchoredtoTopLeftwithanoffsetof(50,150)settingthetooltipto"Select Race Protoss"withbuttontext"Protoss"andthehoverimagesetto""Variable-SetPlayer1-RaceArray[3]=(Lastcreateddialogitem)Dialog-Show(Lastcreateddialog)for(Playergroup(1))
Trigger 5 - Action Definition - Masser Dialog ( Not Suppose to Disappear & Suppose to work for each player ) Currently working for 1 player
Player1-MasserDialogOptions:ActionReturnType:(None)ParametersGrammarText:Player1-MasserDialog()HintText:(None)CustomScriptCodeLocalVariablesActionsDialog-CreateaModaldialogofsize(250,250)at(0,25)relativetoTopofscreenVariable-SetPlayer1-MasserVar=(Lastcreateddialog)Dialog-Createalabelfordialog(Lastcreateddialog)withthedimensions(200,50)anchoredtoTopLeftwithanoffsetof(75,25)withthetext"Mass To.."colorsettoWhitetextwriteoutsettofalsewithawriteoutdurationof2.0Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(50,50)anchoredtoTopLeftwithanoffsetof(75,50)settingthetooltipto"Send Units to Player 2"withbuttontext"P2"andthehoverimagesetto""Variable-SetPlayer1-MasserArray[2]=(Lastcreateddialogitem)Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(50,50)anchoredtoTopLeftwithanoffsetof(125,50)settingthetooltipto"Send Units to Player 3"withbuttontext"P3"andthehoverimagesetto""Variable-SetPlayer1-MasserArray[3]=(Lastcreateddialogitem)Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(50,50)anchoredtoTopLeftwithanoffsetof(75,175)settingthetooltipto"Send Units to Player 6"withbuttontext"P6"andthehoverimagesetto""Variable-SetPlayer1-MasserArray[6]=(Lastcreateddialogitem)Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(50,50)anchoredtoTopLeftwithanoffsetof(125,175)settingthetooltipto"Send Units to Player 7"withbuttontext"P7"andthehoverimagesetto""Variable-SetPlayer1-MasserArray[7]=(Lastcreateddialogitem)Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(50,50)anchoredtoTopLeftwithanoffsetof(30,90)settingthetooltipto"Send Units to Player 1"withbuttontext"P1"andthehoverimagesetto""Variable-SetPlayer1-MasserArray[1]=(Lastcreateddialogitem)Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(50,50)anchoredtoTopLeftwithanoffsetof(30,135)settingthetooltipto"Send Units to Player 5"withbuttontext"P5"andthehoverimagesetto""Variable-SetPlayer1-MasserArray[5]=(Lastcreateddialogitem)Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(50,50)anchoredtoTopLeftwithanoffsetof(170,90)settingthetooltipto"Send Units to Player 4"withbuttontext"P4"andthehoverimagesetto""Variable-SetPlayer1-MasserArray[4]=(Lastcreateddialogitem)Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(50,50)anchoredtoTopLeftwithanoffsetof(170,135)settingthetooltipto"Send Units to Player 8"withbuttontext"P8"andthehoverimagesetto""Variable-SetPlayer1-MasserArray[8]=(Lastcreateddialogitem)Dialog-Createabuttonfordialog(Lastcreateddialog)withthedimensions(80,80)anchoredtoTopLeftwithanoffsetof(85,98)settingthetooltipto"Send Units to Center of Map"withbuttontext"CEN"andthehoverimagesetto""Variable-SetPlayer1-MasserArray[9]=(Lastcreateddialogitem)Dialog-Show(Lastcreateddialog)for(Playergroup(1))
The Problem is that you destroy all dialogs when player 1 clicks a
dialog button. Instead of destroying all, just hide it for the
triggering player.
Quoted for Truth. I tried to do what you are doing too, and don't destroy your precious work, just hide it for the player. Or put him in a group (people who are done voting/people with a unit) and after that disable it for that group.
thanks so much, ill try it when i get home, if it doesnt work ill be back for more advice. ive only been using the editing for a few days now but i think i am starting to get a hang of it. been reading a lot of tutorials.
on a side note question, does anyone know where to edit Talents? for instance the Reaper Nitro Pack upgrade i cannot find anywhere(i have story and campaign depends enabled) and it says its listed as a talen and i need to edit the cost of it but i am unable to locate it.
on a side note question, does anyone know where to edit Talents? for
instance the Reaper Nitro Pack upgrade i cannot find anywhere(i have
story and campaign depends enabled) and it says its listed as a talen
and i need to edit the cost of it but i am unable to locate it.
Its an upgrade, not a talent. In the data editor go to upgrades, search for reaper and go to the Cost tab.
I forgot : one important tip is that you don't need to make 12 dialogs for 12 players. 12 is enough, you can then manipulate this dialog for each player separatly.
@DrTrunks : the "@DrTrunks" in my previous post is a mistake.
By the way I was talking about using "for each integer" it would save him a lot of space.
That didnt work, but i was able to get advice from imisu to look at a certain map and see how its done, the way that works properly is to make a global variable with the type as dialog, and show or hide the dialog based on the global one that was created.
thanks all who replied and attempted to help.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello,
I am having a bit of trouble with my trigger, currently i have a dialog with 3 dialog buttons for a player to select their race. now i made a new dialog for each player (2 just for testing purposes until i know it works) and when player 1 or player 2 picks their race, it stops working and the other cannot. i tried it with destroy all dialogs and all types of different ways, so i reverted back to the way it used to be with destroy all so i can get some input. ill display the code below.
Trigger 1 - Player 1 - Select Race Dialog
Trigger 2 - Global Var
Trigger 3 - Global Array
Trigger 4 - Race Selection - Give Units/Buildings
Trigger 5 - Action Definition - Masser Dialog ( Not Suppose to Disappear & Suppose to work for each player ) Currently working for 1 player
Trigger 6 - Masser Variable
Trigger 7 - Masser Array
Trigger 8 - Move Units
Trigger 9 - Variable - Hydra Group for sending
I basically have the same thing for player 2 but changed a few points and group things. can anyone tell me how to fix this?
The Problem is that you destroy all dialogs when player 1 clicks a dialog button. Instead of destroying all, just hide it for the triggering player.
Quoted for Truth. I tried to do what you are doing too, and don't destroy your precious work, just hide it for the player. Or put him in a group (people who are done voting/people with a unit) and after that disable it for that group.
thanks so much, ill try it when i get home, if it doesnt work ill be back for more advice. ive only been using the editing for a few days now but i think i am starting to get a hang of it. been reading a lot of tutorials.
on a side note question, does anyone know where to edit Talents? for instance the Reaper Nitro Pack upgrade i cannot find anywhere(i have story and campaign depends enabled) and it says its listed as a talen and i need to edit the cost of it but i am unable to locate it.
Its an upgrade, not a talent. In the data editor go to upgrades, search for reaper and go to the Cost tab.
'For each player in player group' is a For loop too, depending on what you are doing you could use an integer for players too.
That didnt work, but i was able to get advice from imisu to look at a certain map and see how its done, the way that works properly is to make a global variable with the type as dialog, and show or hide the dialog based on the global one that was created.
thanks all who replied and attempted to help.