• 🏆 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!

Dialog Hero Selection Help

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
I'm new to starcraft 2 editting. I'm trying to create a dialog based hero selection screen. I have these two triggers.

  • Events
    • Game - Map initialization
  • Local Variables
  • Conditions
  • Actions
    • UI - Hide World for Players
    • UI - Hide game UI for Players
    • Dialog - Create a Modal dialog of size (1300, 600) at (0, -150) relative to Center of screen
    • Variable - Set DialogBox Heroes = (Last created dialog)
    • Dialog - Show DialogBox Heroes for Players
    • Dialog - Create a label for dialog DialogBox Heroes with the dimensions (100, 100) anchored to Top with an offset of (-500, 50) with the text "Jim Raynor" color set to White text writeout set to False with a writeout duration of 2.0
    • Dialog - Create a button for dialog DialogBox Heroes with the dimensions (150, 50) anchored to Top with an offset of (-500, 250) setting the tooltip to "" with button text "Pick Hero" and the hover image set to ""
    • Variable - Set DialogItems Buttons[1] = (Last created dialog item)
    • Dialog - Show DialogItems Buttons[1] for Players
    • Dialog - Enable DialogItems Buttons[1] for Players
    • Dialog - Create an image for dialog DialogBox Heroes with the dimensions (150, 150) anchored to Top with an offset of (-500, 100) setting the tooltip to "" using the image Assets\Textures\btn-unit-terran-marineraynor.dds as a Normal type with tiled set to False tint color White and blend mode Normal
    • Dialog - Show (Last created dialog item) for Players
    • Dialog - Create a label for dialog DialogBox Heroes with the dimensions (100, 100) anchored to Top with an offset of (-300, 50) with the text "Rory Swann" color set to White text writeout set to False with a writeout duration of 2.0
    • Dialog - Create a button for dialog DialogBox Heroes with the dimensions (150, 50) anchored to Top with an offset of (-300, 250) setting the tooltip to "" with button text "Pick Hero" and the hover image set to ""
    • Variable - Set DialogItems Buttons[2] = (Last created dialog item)
    • Dialog - Show DialogItems Buttons[2] for Players
    • Dialog - Enable DialogItems Buttons[2] for Players
    • Dialog - Create an image for dialog DialogBox Heroes with the dimensions (150, 150) anchored to Top with an offset of (-300, 100) setting the tooltip to "" using the image Assets\Textures\btn-unit-terran-marauderswann.dds as a Normal type with tiled set to False tint color White and blend mode Normal
    • Dialog - Show (Last created dialog item) for Players
    • Dialog - Create a label for dialog DialogBox Heroes with the dimensions (100, 100) anchored to Top with an offset of (-100, 50) with the text "Siege Tank" color set to White text writeout set to False with a writeout duration of 2.0
    • Dialog - Create a button for dialog DialogBox Heroes with the dimensions (150, 50) anchored to Top with an offset of (-100, 250) setting the tooltip to "" with button text "Pick Hero" and the hover image set to ""
    • Variable - Set DialogItems Buttons[3] = (Last created dialog item)
    • Dialog - Show DialogItems Buttons[3] for Players
    • Dialog - Enable DialogItems Buttons[3] for Players
    • Dialog - Create an image for dialog DialogBox Heroes with the dimensions (150, 150) anchored to Top with an offset of (-100, 100) setting the tooltip to "" using the image Assets\Textures\btn-unit-terran-siegetankmercenary-tank.dds as a Normal type with tiled set to False tint color White and blend mode Normal
    • Dialog - Show (Last created dialog item) for Players
    • Dialog - Create a label for dialog DialogBox Heroes with the dimensions (100, 100) anchored to Top with an offset of (100, 50) with the text "Science Vessel" color set to White text writeout set to False with a writeout duration of 2.0
    • Dialog - Create a button for dialog DialogBox Heroes with the dimensions (150, 50) anchored to Top with an offset of (100, 250) setting the tooltip to "" with button text "Pick Hero" and the hover image set to ""
    • Variable - Set DialogItems Buttons[4] = (Last created dialog item)
    • Dialog - Show DialogItems Buttons[4] for Players
    • Dialog - Enable DialogItems Buttons[4] for Players
    • Dialog - Create an image for dialog DialogBox Heroes with the dimensions (150, 150) anchored to Top with an offset of (100, 100) setting the tooltip to "" using the image Assets\Textures\btn-unit-terran-sciencevessel.dds as a Normal type with tiled set to False tint color White and blend mode Normal
    • Dialog - Show (Last created dialog item) for Players
  • Events
    • Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
  • Local Variables
  • Conditions
    • Or
      • Conditions
        • (Used dialog item) == DialogItems Buttons[1]
        • (Used dialog item) == DialogItems Buttons[2]
        • (Used dialog item) == DialogItems Buttons[3]
        • (Used dialog item) == DialogItems Buttons[4]
  • Actions
    • UI - Show World for (Player group((Triggering player)))
    • Dialog - Hide DialogBox Heroes for (Player group(1))
    • UI - Show game UI for (Player group((Triggering player)))
    • General - If (Conditions) then do (Actions) else do (Actions)
      • If
        • (Used dialog item) == DialogItems Buttons[1]
      • Then
        • Unit - Create 1 Jim Raynor (Marine) for player (Triggering player) at (Center of Hero Spawn) using default facing (No Options)
        • Camera - Pan the camera for player (Triggering player) to (Center of Hero Spawn) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
      • Else
        • General - If (Conditions) then do (Actions) else do (Actions)
          • If
            • (Used dialog item) == DialogItems Buttons[2]
          • Then
            • Unit - Create 1 Rory Swann for player (Triggering player) at (Center of Hero Spawn) using default facing (No Options)
            • Camera - Pan the camera for player (Triggering player) to (Center of Hero Spawn) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
          • Else
            • General - If (Conditions) then do (Actions) else do (Actions)
              • If
                • (Used dialog item) == DialogItems Buttons[3]
              • Then
                • Unit - Create 1 Merc - Siege Breaker (Tank Mode) (Merc Siege Tank) for player (Triggering player) at (Center of Hero Spawn) using default facing (No Options)
                • Camera - Pan the camera for player (Triggering player) to (Center of Hero Spawn) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
              • Else
                • General - If (Conditions) then do (Actions) else do (Actions)
                  • If
                    • (Used dialog item) == DialogItems Buttons[4]
                  • Then
                    • Unit - Create 1 Science Vessel for player (Triggering player) at (Center of Hero Spawn) using default facing (No Options)
                    • Camera - Pan the camera for player (Triggering player) to (Center of Hero Spawn) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
                  • Else
Trouble is, the dialog screen doesnt hide, and the UI doesn't show again. Can anyone help? Thanks.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Sorry, I placed the "1" in there to refer to player 1 red, just in case it was the triggering player that was bugging up and forgot to change it back.

Is there anything else wrong with the trigger? Because when i click "pick hero", the dialog screen remains there, the world shows (i can move my unit
around with a dialog screen box in the way) and the minimap, menu, etc (UI) doesn't show up. It's wierd, I hope you understand.
 
Status
Not open for further replies.
Top