Dialog Issues, and "behind Target" problem +Rep!

Seannny

Why GUI when you can Jass?
Reaction score
46
Ive looked all over this trigger, so has my friend and we cant seem to find the problem.

What its supposed to do is create a dialog box for the player who typed -new. Originally i had all players in one trigger. But it only worked for player one for some reason. Now i seperated them all into their own triggers, but it still only works for player one. Its not so much what comes after the dialog thats the problem, but actually having it show.

Blue, teal and purple are identical, except for the arrays on the variables. (same as player number)

Code:
Race Pick Copy 2
    Events
        Player - Player 2 (Blue) types a chat message containing -new as An exact match
    Conditions
    Actions
        Dialog - Clear Dialog[2]
        Dialog - Change the title of Dialog[2] to Races
        Dialog - Create a dialog button for Dialog[2] labelled Nord
        Set DBNord[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[2] labelled Imperial
        Set DBImperial[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[2] labelled Redgaurd
        Set DBRedgaurd[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[2] labelled Dark Elf
        Set DBDarkElf[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[2] labelled Wood Elf
        Set DBWoodElf[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[2] labelled Breton
        Set DBBreton[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[2] labelled Khajiit
        Set DBKahjiit[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[2] labelled Orc
        Set DBOrc[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[2] labelled High Elf
        Set DBHighElf[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[2] labelled Argonian
        Set DBArgonian[2] = (Last created dialog Button)
        Dialog - Show Dialog[2] for Player 2 (Blue)
        Trigger - Turn off (This trigger)

My second problem is a problem with a spell, Pickpocket. i dont even know whats wrong with it. How it SHOULD work, is a spell that works only from behind, your agility x 2 needs to be greater than a random roll between 1 and 50. if it is, its a success, if not, its a failure. However the units never seem to be behind the the target, no matter what.
BUT
Sometimes its still a success... never in front, but sometimes from the back it works. if i just spam the spell, 2 out of 10 times it works. others say "Must be behind target!"

Code:
Pickpocket VIllagers
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        And - All (Conditions) are true
            Conditions
                Or - Any (Conditions) are true
                    Conditions
                        ((Target unit of ability being cast) is in (Units owned by Player 1 (Red))) Equal to False
                        ((Target unit of ability being cast) is in (Units owned by Player 2 (Blue))) Equal to False
                        ((Target unit of ability being cast) is in (Units owned by Player 3 (Teal))) Equal to False
                        ((Target unit of ability being cast) is in (Units owned by Player 4 (Purple))) Equal to False
                (Ability being cast) Equal to PickPocket 
    Actions
        Unit - Make (Triggering unit) face (Target unit of ability being cast) over 0.10 seconds
        Set Temp = (Position of (Triggering unit))
        Set Temp2 = (Position of (Target unit of ability being cast))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        (Angle from Temp to Temp2) Greater than ((Facing of (Target unit of ability being cast)) + 120.00)
                        (Angle from Temp to Temp2) Less than ((Facing of (Target unit of ability being cast)) - 240.00)
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Random integer number between 1 and 50) Less than or equal to ((Agility of (Triggering unit) (Include bonuses)) x 2)
                    Then - Actions
                        Player - Add (Random integer number between 1 and 5) to (Owner of (Triggering unit)) Current gold
                        Floating Text - Create floating text that reads Success! above (Triggering unit) with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 50.00% transparency
                        Floating Text - Change (Last created floating text): Disable permanence
                        Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                        Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
                        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                    Else - Actions
                        Set PPfail = (Random integer number between 1 and 5)
                        Player - Set (Owner of (Triggering unit)) Current gold to ((Player 1 (Red) Current gold) - PPfail)
                        Floating Text - Create floating text that reads (  |cffE62129Failure! The target takes some of your money + ( You have lost  + ((String(PPfail)) +  Drakes!))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 50.00% transparency
                        Floating Text - Change (Last created floating text): Disable permanence
                        Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                        Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
                        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
            Else - Actions
                Floating Text - Create floating text that reads Must be Behind targ... above (Triggering unit) with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 50.00% transparency
                Floating Text - Change (Last created floating text): Disable permanence
                Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
                Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Custom script:   call RemoveLocation (udg_Temp)
        Custom script:   call RemoveLocation (udg_Temp2)

+rep if you can crack it!
 

Jolly chap*

New Member
Reaction score
34
For the first trigger.

Dialog - Show Dialog[2] for Player 2 (Blue)

Maybe you accidentally copied and pasted that for all the triggers? I dunno. :p

For the second trigger, I'm not so sure what's wrong with it, but:

Code:
                        (Angle from Temp to Temp2) Greater than ((Facing of (Target unit of ability being cast)) + 120.00)
                        (Angle from Temp to Temp2) Less than ((Facing of (Target unit of ability being cast)) - 240.00)

Say if the angle is 90, it has to be greater than 210 ... or less than 150 which is confusing. Greater than 210 and less than 150 means that if you were exactly behind it, it wouldn't work. >.< Though, I might be delusional. It's late right now.
 

Seannny

Why GUI when you can Jass?
Reaction score
46
For the first trigger.

Dialog - Show Dialog[2] for Player 2 (Blue)

Maybe you accidentally copied and pasted that for all the triggers? I dunno. :p

For the second trigger, I'm not so sure what's wrong with it, but:

Code:
                        (Angle from Temp to Temp2) Greater than ((Facing of (Target unit of ability being cast)) + 120.00)
                        (Angle from Temp to Temp2) Less than ((Facing of (Target unit of ability being cast)) - 240.00)

Say if the angle is 90, it has to be greater than 210 ... or less than 150 which is confusing. Greater than 210 and less than 150 means that if you were exactly behind it, it wouldn't work. >.< Though, I might be delusional. It's late right now.

For the first one, no thats not it, becuase blue cant see Dialog either.

for the second one, it was... what, less than 45 greater than -45? i think? then someone told me to change it to this, So it didnt work either way. Do you have an exact number to set it too? degrees i dont understand very well...
 

Jolly chap*

New Member
Reaction score
34
You could have a range of facing degrees. Something like:

Code:
(Angle of Temp to Temp2) Greater than or Equal to ((Facing of (Target unit of ability being cast)) - 90.00)
(Angle of Temp to Temp2) Less than or Equal to ((Facing of (Target unit of ability being cast)) + 90.00)

Something like that anyway. I don't have WE open right now.
 

DrEvil

FCRI Associate!
Reaction score
111
This should fix your first problem :
Code:
Pick Race
    Events
        Player - Player 1 (Red) types a chat message containing -new as An exact match
        Player - Player 2 (Blue) types a chat message containing -new as An exact match
        Player - Player 3 (Teal) types a chat message containing -new as An exact match
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering player) is in HasPicked) Equal to False
            Then - Actions
                Player Group - Add (Triggering player) to HasPicked
            Else - Actions
                Skip remaining actions
        Set PlayerNum = (Player number of (Triggering player))
        Dialog - Clear Dialog[PlayerNum]
        Dialog - Create a dialog button for Dialog[PlayerNum] labelled Race 1
        Set Race1[PlayerNum] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[PlayerNum] labelled Race 2
        Set Race2[PlayerNum] = (Last created dialog Button)
        Dialog - Show Dialog[PlayerNum] for (Triggering player)
 

Jolly chap*

New Member
Reaction score
34
This should fix your first problem :
Code:
Pick Race
    Events
        Player - Player 1 (Red) types a chat message containing -new as An exact match
        Player - Player 2 (Blue) types a chat message containing -new as An exact match
        Player - Player 3 (Teal) types a chat message containing -new as An exact match
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering player) is in HasPicked) Equal to False
            Then - Actions
                Player Group - Add (Triggering player) to HasPicked
            Else - Actions
                Skip remaining actions
        Set PlayerNum = (Player number of (Triggering player))
        Dialog - Clear Dialog[PlayerNum]
        Dialog - Create a dialog button for Dialog[PlayerNum] labelled Race 1
        Set Race1[PlayerNum] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[PlayerNum] labelled Race 2
        Set Race2[PlayerNum] = (Last created dialog Button)
        Dialog - Show Dialog[PlayerNum] for (Triggering player)
Wouldn't that be, um, just the same as his trigger anyway? But it could work; I think I've made a similar dialog trigger in that fashion as well.
 

Seannny

Why GUI when you can Jass?
Reaction score
46
Thanks both of you, I havent tested the pickpocket but the dialog works.

Edit: Yikes, no it doesnt, it almost did XD.

The dialog still wont work.
 

Seannny

Why GUI when you can Jass?
Reaction score
46
Bump.

I changed the trigger around to make it more efficient, but it still doesnt seem to work.

Code:
Init
    Events
        Map initialization
    Conditions
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                Dialog - Create a dialog button for Dialog[(Integer A)] labelled Argonian
                Set DBArgonian[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog[(Integer A)] labelled Breton
                Set DBBreton[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog[(Integer A)] labelled Dark Elf
                Set DBDarkElf[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog[(Integer A)] labelled High Elf
                Set DBHighElf[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog[(Integer A)] labelled Imperial
                Set DBImperial[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog[(Integer A)] labelled Kahjiit
                Set DBKahjiit[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog[(Integer A)] labelled Nord
                Set DBNord[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog[(Integer A)] labelled Orc
                Set DBOrc[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog[(Integer A)] labelled Redguard
                Set DBRedgaurd[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog[(Integer A)] labelled Wood Elf
                Set DBWoodElf[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog2[(Integer A)] labelled Elementalist
                Set ClassElementalist = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog2[(Integer A)] labelled Holy
                Set ClassHoly = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog2[(Integer A)] labelled Hunter
                Set ClassHunter = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog2[(Integer A)] labelled Paladin
                Set ClassPaladin = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog2[(Integer A)] labelled Ranger
                Set ClassRanger = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog2[(Integer A)] labelled Spellsword
                Set ClassSpellsword = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog2[(Integer A)] labelled Thief
                Set ClassTheif = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog2[(Integer A)] labelled Unholy
                Set ClassUnholy = (Last created dialog Button)
                Dialog - Create a dialog button for Dialog2[(Integer A)] labelled Warrior
                Set ClassWarrior = (Last created dialog Button)

Then at the end of a cinimatic, i simply add the lines
Dialog - Show Dialog[1] for Player 1 (Red)
for each player.

This is driving me NUTS! anyone have any idea
 

Tythoid

New Member
Reaction score
23
For the dialog have one trigger that makes it then a seperate trigger to show eg
game time is 1 second

clear dialog 2
create a button for dialog 2 labled blah
set blah = last created dialog button

player types -new as a exact match
show dialog 2 to triggering player.

keep it simple your over complicating or running the trigger several times which messes up the dialog heres one of my dialogs
Code:
Events
    Time - Elapsed game time is 5.00 seconds

Actions
    Dialog - Clear Dialogmodepick
    Dialog - Change the title of Dialogmodepick to Game mode?
    Dialog - Create a dialog button for Dialogmodepick labelled Free For All
    Set Buttonffa = (Last created dialog Button)
    Dialog - Create a dialog button for Dialogmodepick labelled Teams of Two
    Set Buttonteamsof2 = (Last created dialog Button)
    Dialog - Create a dialog button for Dialogmodepick labelled Multi Alliance
    Set Buttonmultialliance = (Last created dialog Button)
    -------- Income picker --------
    Dialog - Clear Dialog_Incomepick
    Dialog - Change the title of Dialog_Incomepick to Income awarded per ...
    Dialog - Create a dialog button for Dialog_Incomepick labelled 3 Metal 1 Crystal (...
    Set button_3g_1l = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_Incomepick labelled 5 Metal 1 Crystal (...
    Set button_5g_1l = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_Incomepick labelled 8 Metal 2 Crystal (...
    Set button_8g_2l = (Last created dialog Button)
    -------- Ally dialog --------
    Dialog - Clear Dialog_allying
    Dialog - Change the title of Dialog_allying to Ally who? Clicking ...
    Dialog - Create a dialog button for Dialog_allying labelled (|cffff0000 + ((Name of Player 1 (Red)) + |r))
    Set Button_player01red = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled (|cff003EFF + ((Name of Player 2 (Blue)) + |r))
    Set Button_player02blue = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled (|cff00C5CD + ((Name of Player 3 (Teal)) + |r))
    Set Button_player03teal = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled (|cff380474 + ((Name of Player 4 (Purple)) + |r))
    Set Button_player04purple = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled (|cffFCD116 + ((Name of Player 5 (Yellow)) + |r))
    Set Button_player05yellow = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled (|cffFFA500 + ((Name of Player 6 (Orange)) + |r))
    Set Button_player06orange = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled Next Page..
    Set Button_playernextpage = (Last created dialog Button)
    -------- Ally dialog --------
    Dialog - Clear Dialog_allying2
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cffAADD00 + ((Name of Player 7 (Green)) + |r))
    Set Button_player07green = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cffFA8072 + ((Name of Player 8 (Pink)) + |r))
    Set Button_player08pink = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cff5E5E5E + ((Name of Player 9 (Gray)) + |r))
    Set Button_player09grey = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cff9AC0CD + ((Name of Player 10 (Light Blue)) + |r))
    Set Button_player10lightblue = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cff3B5323 + ((Name of Player 11 (Dark Green)) + |r))
    Set Button_player11darkgreen = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cff603311 + ((Name of Player 12 (Brown)) + |r))
    Set Button_player12brown = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled Cancel..
 

Seannny

Why GUI when you can Jass?
Reaction score
46
For the dialog have one trigger that makes it then a seperate trigger to show eg
game time is 1 second

clear dialog 2
create a button for dialog 2 labled blah
set blah = last created dialog button

player types -new as a exact match
show dialog 2 to triggering player.

keep it simple your over complicating or running the trigger several times which messes up the dialog heres one of my dialogs
Code:
Events
    Time - Elapsed game time is 5.00 seconds

Actions
    Dialog - Clear Dialogmodepick
    Dialog - Change the title of Dialogmodepick to Game mode?
    Dialog - Create a dialog button for Dialogmodepick labelled Free For All
    Set Buttonffa = (Last created dialog Button)
    Dialog - Create a dialog button for Dialogmodepick labelled Teams of Two
    Set Buttonteamsof2 = (Last created dialog Button)
    Dialog - Create a dialog button for Dialogmodepick labelled Multi Alliance
    Set Buttonmultialliance = (Last created dialog Button)
    -------- Income picker --------
    Dialog - Clear Dialog_Incomepick
    Dialog - Change the title of Dialog_Incomepick to Income awarded per ...
    Dialog - Create a dialog button for Dialog_Incomepick labelled 3 Metal 1 Crystal (...
    Set button_3g_1l = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_Incomepick labelled 5 Metal 1 Crystal (...
    Set button_5g_1l = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_Incomepick labelled 8 Metal 2 Crystal (...
    Set button_8g_2l = (Last created dialog Button)
    -------- Ally dialog --------
    Dialog - Clear Dialog_allying
    Dialog - Change the title of Dialog_allying to Ally who? Clicking ...
    Dialog - Create a dialog button for Dialog_allying labelled (|cffff0000 + ((Name of Player 1 (Red)) + |r))
    Set Button_player01red = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled (|cff003EFF + ((Name of Player 2 (Blue)) + |r))
    Set Button_player02blue = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled (|cff00C5CD + ((Name of Player 3 (Teal)) + |r))
    Set Button_player03teal = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled (|cff380474 + ((Name of Player 4 (Purple)) + |r))
    Set Button_player04purple = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled (|cffFCD116 + ((Name of Player 5 (Yellow)) + |r))
    Set Button_player05yellow = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled (|cffFFA500 + ((Name of Player 6 (Orange)) + |r))
    Set Button_player06orange = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying labelled Next Page..
    Set Button_playernextpage = (Last created dialog Button)
    -------- Ally dialog --------
    Dialog - Clear Dialog_allying2
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cffAADD00 + ((Name of Player 7 (Green)) + |r))
    Set Button_player07green = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cffFA8072 + ((Name of Player 8 (Pink)) + |r))
    Set Button_player08pink = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cff5E5E5E + ((Name of Player 9 (Gray)) + |r))
    Set Button_player09grey = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cff9AC0CD + ((Name of Player 10 (Light Blue)) + |r))
    Set Button_player10lightblue = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cff3B5323 + ((Name of Player 11 (Dark Green)) + |r))
    Set Button_player11darkgreen = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled (|cff603311 + ((Name of Player 12 (Brown)) + |r))
    Set Button_player12brown = (Last created dialog Button)
    Dialog - Create a dialog button for Dialog_allying2 labelled Cancel..

im not making it more complex though, my is more simple than yours =/ ill try your way though.

Edit: Theres no difference between your way and mine. Im simply running mine for 4 people at once. Changing it to 4 people over 4 triggers will do nothing.
 

denmax

You can change this now in User CP.
Reaction score
155
Just edit anything in this trigger =P.. I just C+P it from my own map..

Now all you need to edit for the variables are nothing since it will pause the game. If you disagree on pausing the game then I suggest using [Player number]..

Trigger:
  • Mode Type
    • Events
      • Time - Elapsed game time is 0.30 seconds
    • Conditions
    • Actions
      • Custom script: call GetHost()
      • Dialog - Clear Dialog
      • Dialog - Change the title of Dialog to |c000042ffGame Mode
      • Dialog - Create a dialog button for Dialog labelled |c000042ffFree For ...
      • Set DialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled |c000042ffTeam by 2
      • Set DialogButton[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled |c000042ffTeam by 4
      • Set DialogButton[3] = (Last created dialog Button)
      • Dialog - Show Dialog for Host
      • Game - Pause the game
      • Quest - Create a Optional quest titled (ColorCode[(Player number of Host)] + ((Name of Host) + EndTag)) with the description This player is our ..., using icon path ReplaceableTextures\CommandButtons\BTNSelectHeroOff.blp
      • Trigger - Add to Command Retry &lt;gen&gt; the event (Player - Host types a chat message containing -retry as A substring)


Trigger:
  • FFA
    • Events
      • Dialog - A dialog button is clicked for Dialog
    • Conditions
      • (Clicked dialog button) Equal to DialogButton[1]
    • Actions
      • Set GameMode = |c000042ffFFA|r
      • Game - Display to (All players) the text: |c000042ffFree For ...
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Team by 2 &lt;gen&gt;
      • Trigger - Turn off Team by 4 &lt;gen&gt;
      • Wait 0.00 seconds
      • Trigger - Turn on Dialog 10 &lt;gen&gt;
      • Trigger - Turn on Dialog 20 &lt;gen&gt;
      • Trigger - Turn on Dialog 30 &lt;gen&gt;
      • Trigger - Turn on Dialog 40 &lt;gen&gt;
      • Trigger - Turn on Dialog 50 &lt;gen&gt;
      • Game - Unpause the game
 

Seannny

Why GUI when you can Jass?
Reaction score
46
I am just so baffled and confused as to why this wont work. It only works for player one. Heres my display dialog trigger

Code:
Dialog
    Events
        Time - Elapsed game time is 35.00 seconds
    Conditions
    Actions
        Dialog - Show Dialog[1] for Player 1 (Red)
        Dialog - Show Dialog[2] for Player 2 (Blue)
        Dialog - Show Dialog[3] for Player 3 (Teal)
        Dialog - Show Dialog[4] for Player 4 (Purple)
        Game - Display to (All players) for 5.00 seconds the text: Dialog has been sho...


The text says "Dialog has been shown" no matter what player i am, however only as player one will it show up. Im almost ready to just make 4 seperate triggers to show 1 for each.

Lol. I made 4 seperate triggers just to try it with the triggers looking like this

Code:
Dialog Copy
    Events
        Player - Player 2 (Blue) types a chat message containing -new as An exact match
    Conditions
    Actions
        Dialog - Show Dialog[2] for Player 2 (Blue)
        Game - Display to (All players) for 5.00 seconds the text: ((Name of (Triggering player)) +  Has created a new character.)

And of course, it still doesnt work, HOWEVER the text is still displayed!
 

elmstfreddie

The Finglonger
Reaction score
203
I'm Sean's friend, and I solved it for him.. just posting so that people who have the same problem know the solution. =/

Basically GUI is being GAI again, and when you get a dialogue variable an array only the first array is a created dialogue, and the rest are empty variables. So, you gotta set each array to DialogCreate() using JASS....

aka

set Dialog[1] = DialogCreate()
set Dialog[2] = DialogCreate()

etc.


PS: There is no create dialogue action in GUI... >_<
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Your array size on that dialog array is 1? Change to 4...

A better plan though is to create that dialog only once, and show the same dialog to every player...
 

vypur85

Hibernate
Reaction score
803
Code:
    Actions
        Unit - Make (Triggering unit) face (Target unit of ability being cast) over 0.10 seconds
        Set Temp = (Position of (Triggering unit))
        Set Temp2 = (Position of (Target unit of ability being cast))
[B]        Set Real_Angle = (Angle from Temp2 to Temp)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Real_Angle Less than 0.00
            Then - Actions
                Set Real_Angle = Real_Angle + 360.00
            Else - Actions[/B]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        [B]Real_Angle[/B] Greater than ((Facing of (Target unit of ability being cast)) + 120.00)
                        [B]Real_Angle[/B] Less than ((Facing of (Target unit of ability being cast)) - [B]120.00[/B])
            Then - Actions
                    ...

Try something like above. Change to the bolded stuff.
 

Seannny

Why GUI when you can Jass?
Reaction score
46
Your array size on that dialog array is 1? Change to 4...

A better plan though is to create that dialog only once, and show the same dialog to every player...


Tested with an Array of 4. In fact was almost the first thing we did.
From my experience the default array size changes nothing in GUI. Including this case. =P
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top