• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Dialog Problems

Status
Not open for further replies.
Level 18
Joined
May 27, 2007
Messages
1,689
ya like the title says i am having dialog problems, it seems that sometimes the dialog will pop up without any buttons, and you will be stuck looking at a blank dialog allowing you to do nothing, could someone give me a possible reason for this happening? if needed i can post trigger

  • When
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Select CIS Hero
    • Actions
      • Wait (Random real number between 0.00 and 2.00) seconds
      • Set CP = (Position of (Casting unit))
      • Dialog - Change the title of Select_Hero to Choose Your Hero
      • Dialog - Create a dialog button for Select_Hero labelled Droideka
      • Set Droideka = (Last created dialog Button)
      • Dialog - Create a dialog button for Select_Hero labelled Rocket Droid
      • Set RocketDroid = (Last created dialog Button)
      • Dialog - Create a dialog button for Select_Hero labelled Assault Droid
      • Set AssaultDroid = (Last created dialog Button)
      • Dialog - Create a dialog button for Select_Hero labelled Sniper Droid
      • Set SniperDroid = (Last created dialog Button)
      • Dialog - Show Select_Hero for (Triggering player)
  • When Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Select Republic Hero
    • Actions
      • Wait (Random real number between 0.00 and 2.00) seconds
      • Set CP_Copy = (Position of (Casting unit))
      • Dialog - Change the title of Select_Hero_Copy to Choose Your Hero
      • Dialog - Create a dialog button for Select_Hero_Copy labelled Arc Trooper
      • Set ArcTrooper = (Last created dialog Button)
      • Dialog - Create a dialog button for Select_Hero_Copy labelled Rocket Trooper
      • Set RocketTrooper = (Last created dialog Button)
      • Dialog - Create a dialog button for Select_Hero_Copy labelled Assault Trooper
      • Set CloneTrooper = (Last created dialog Button)
      • Dialog - Create a dialog button for Select_Hero_Copy labelled Sniper Clone
      • Set CloneSniper = (Last created dialog Button)
      • Dialog - Show Select_Hero_Copy for (Triggering player)
  • Choose
    • Events
      • Dialog - A dialog button is clicked for Select_Hero
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (If ((((Picked unit) is A Hero) Equal to True) and ((Owner of (Picked unit)) Equal to (Triggering player))) then do (Unit - Remove (Picked unit) from the game) else do (Do nothing))
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (((Picked unit) is A Hero) Equal to True) and ((Owner of (Picked unit)) Equal to (Triggering player))
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • If ((Clicked dialog button) Equal to AssaultDroid) then do (Unit - Create 1 Assault Droid for (Triggering player) at CP facing Default building facing degrees) else do (Do nothing)
      • If ((Clicked dialog button) Equal to Droideka) then do (Unit - Create 1 Droideka for (Triggering player) at CP facing Default building facing degrees) else do (Do nothing)
      • If ((Clicked dialog button) Equal to SniperDroid) then do (Unit - Create 1 Sniper Droid for (Triggering player) at CP facing Default building facing degrees) else do (Do nothing)
      • If ((Clicked dialog button) Equal to RocketDroid) then do (Unit - Create 1 Rocket Droid for (Triggering player) at CP facing Default building facing degrees) else do (Do nothing)
      • Custom script: call RemoveLocation (udg_CP)
      • Dialog - Clear Select_Hero
      • Unit - Add classification of A peon-type unit to (Last created unit)
  • Choose Copy
    • Events
      • Dialog - A dialog button is clicked for Select_Hero_Copy
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (If ((((Picked unit) is A Hero) Equal to True) and ((Owner of (Picked unit)) Equal to (Triggering player))) then do (Unit - Remove (Triggering unit) from the game) else do (Do nothing))
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (((Picked unit) is A Hero) Equal to True) and ((Owner of (Picked unit)) Equal to (Triggering player))
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • If ((Clicked dialog button) Equal to CloneTrooper) then do (Unit - Create 1 Assault Trooper for (Triggering player) at CP_Copy facing Default building facing degrees) else do (Do nothing)
      • If ((Clicked dialog button) Equal to RocketTrooper) then do (Unit - Create 1 Rocket Trooper for (Triggering player) at CP_Copy facing Default building facing degrees) else do (Do nothing)
      • If ((Clicked dialog button) Equal to CloneSniper) then do (Unit - Create 1 Sniper Clone for (Triggering player) at CP_Copy facing Default building facing degrees) else do (Do nothing)
      • If ((Clicked dialog button) Equal to ArcTrooper) then do (Unit - Create 1 Arc Trooper for (Triggering player) at CP_Copy facing Default building facing degrees) else do (Do nothing)
      • Custom script: call RemoveLocation (udg_CP_Copy)
      • Dialog - Clear Select_Hero_Copy
      • Unit - Add classification of A peon-type unit to (Last created unit)
 
Last edited:
Level 2
Joined
May 24, 2007
Messages
12
How many players are on this map, because if you have more than one on either side (CIS or Republic) that if the dialog is brought up for a player just as another clicks a button for the respective dialog, then the buttons would be cleared off. I think it would be better if you put all the Dialog creation into Map Initialization and don't use the clear dialog commands (At least not until everyone has picked a hero), only calling for the button clicked and the location of the unit that brings up the dialog.
 
Level 18
Joined
May 27, 2007
Messages
1,689
well see i figured that if another person clicked at the same time someone was picking it would clear, but what it is, its that you can pick a selection of heroes, from each command post every time you die, which is why i can just have one at the intialization, and i tried a array, but couldnt seem to get it to work correctly, this is what the array looks like
  • When
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Select CIS Hero
    • Actions
      • Set CP = (Position of (Casting unit))
      • Dialog - Change the title of Select_Hero_Copy[(Player number of (Owner of (Casting unit)))] to Choose Your Hero
      • Dialog - Create a dialog button for Select_Hero_Copy[(Player number of (Owner of (Casting unit)))] labelled Droideka
      • Set Droideka[(Player number of (Owner of (Casting unit)))] = (Last created dialog Button)
      • Dialog - Create a dialog button for Select_Hero_Copy[(Player number of (Owner of (Casting unit)))] labelled Rocket Droid
      • Set RocketDroid[(Player number of (Owner of (Casting unit)))] = (Last created dialog Button)
      • Dialog - Create a dialog button for Select_Hero_Copy[(Player number of (Owner of (Casting unit)))] labelled Assault Droid
      • Set AssaultDroid[(Player number of (Owner of (Casting unit)))] = (Last created dialog Button)
      • Dialog - Create a dialog button for Select_Hero_Copy[(Player number of (Owner of (Casting unit)))] labelled Sniper Droid
      • Set SniperDroid[(Player number of (Owner of (Casting unit)))] = (Last created dialog Button)
      • Dialog - Show Select_Hero_Copy[(Player number of (Owner of (Casting unit)))] for (Triggering player)
and then i would have to create a seperate one for each of the clicked dialogs but
  • Choose
    • Events
      • Dialog - A dialog button is clicked for Select_Hero_Copy[(Player number of (Player(2)))]
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (If ((((Picked unit) is A Hero) Equal to True) and ((Owner of (Picked unit)) Equal to (Triggering player))) then do (Unit - Remove (Picked unit) from the game) else do (Do nothing))
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (((Picked unit) is A Hero) Equal to True) and ((Owner of (Picked unit)) Equal to (Triggering player))
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • If ((Clicked dialog button) Equal to AssaultDroid[(Player number of (Triggering player))]) then do (Unit - Create 1 Assault Droid for (Triggering player) at CP facing Default building facing degrees) else do (Do nothing)
      • If ((Clicked dialog button) Equal to Droideka[(Player number of (Triggering player))]) then do (Unit - Create 1 Droideka for (Triggering player) at CP facing Default building facing degrees) else do (Do nothing)
      • If ((Clicked dialog button) Equal to SniperDroid[(Player number of (Triggering player))]) then do (Unit - Create 1 Sniper Droid for (Triggering player) at CP facing Default building facing degrees) else do (Do nothing)
      • If ((Clicked dialog button) Equal to RocketDroid[(Player number of (Triggering player))]) then do (Unit - Create 1 Rocket Droid for (Triggering player) at CP facing Default building facing degrees) else do (Do nothing)
      • Custom script: call RemoveLocation (udg_CP)
      • Dialog - Clear Select_Hero_Copy[(Player number of (Triggering player))]
      • Unit - Add classification of A peon-type unit to (Last created unit)
and it doesnt have to do with the second trigger, becuz the dialog does not show up in the first place
 
Status
Not open for further replies.
Top