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

Status
Not open for further replies.
Level 3
Joined
Feb 20, 2008
Messages
54
Today I tried making my first dialog box, I managed and it displays correctly, I also added each created buttons to variables but I can't find an event response for event
  • Events
    • Dialog - A dialog button is clicked for God
    • Conditions
      • (Clicked dialog button) Equal to Button[1]
    • Actions
I need an action for example, Unit - Add AbilityX to Hero[Number of ClickingPlayer]... But there isn't such an action as clickingplayer or something like that, so how can I add ability to the hero of the player.
 
Level 3
Joined
Feb 20, 2008
Messages
54
You're right, this trigger contains a fail but I don't know where it's wrong... I've reread it and retried it a dozen times already, if anyone knows... please...
  • Dialog
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Wait 1.00 seconds
      • Set God = (New Dialog)
      • Dialog - Change the title of God to Choose God
      • Dialog - Create a dialog button for God labelled Rhak'Thar (+20% att...
      • Set Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Maar (10% lifesteal...
      • Set Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Boor (+50 armor)
      • Set Button[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Coorlek (+50% mana ...
      • Set Button[4] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Shinpleo (+25 damag...
      • Set Button[5] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Ither (+10 Intellig...
      • Set Button[6] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Hootha (+10 Strengh...
      • Set Button[7] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Othen (+10 agility)
      • Set Button[8] = (Last created dialog Button)
      • Dialog - Show God for (Owner of (Entering unit))
 
Last edited:
Level 5
Joined
Mar 17, 2005
Messages
135
You're right, this trigger contains a fail but I don't know where it's wrong... I've reread it and retried it a dozen times already, if anyone knows... please...
  • Dialog
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Wait 1.00 seconds
      • Set God = (New Dialog)
      • Dialog - Change the title of God to Choose God
      • Dialog - Create a dialog button for God labelled Rhak'Thar (+20% att...
      • Set Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Maar (10% lifesteal...
      • Set Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Boor (+50 armor)
      • Set Button[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Coorlek (+50% mana ...
      • Set Button[4] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Shinpleo (+25 damag...
      • Set Button[5] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Ither (+10 Intellig...
      • Set Button[6] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Hootha (+10 Strengh...
      • Set Button[7] = (Last created dialog Button)
      • Dialog - Create a dialog button for God labelled Othen (+10 agility)
      • Set Button[8] = (Last created dialog Button)
      • Dialog - Show God for (Owner of (Entering unit))

What's this trigger not doing?
 
Level 4
Joined
Apr 25, 2008
Messages
75
  • Untitled Trigger 001
    • Events
      • Dialog - A dialog button is clicked for God
    • Conditions
      • (Clicked dialog button) Equal to Button[1]
    • Actions
      • Unit - Add War Stomp to Hero[(Player number of (Triggering player))]
I don't see what the problem is? Try taking away the "Wait 1.00 Second" on the other trigger. I hear Waits are buggy. Plus it isn't really needed.

Also I don't think it can detect if a unit enters "Playable Map Area". Just use "Elapsed Time Equal to 1.00 second" and take away the conditions.
 
Level 3
Joined
Feb 20, 2008
Messages
54
No, I mean the dialog is displayed by the second triggers but I don't think the button variables ar good because they don't store the buttons, I tried removing the wait and everything you told me and it still doesn't work.
 
Level 5
Joined
Mar 17, 2005
Messages
135
  • Make Buttons
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Dialog - Show Dialog for (Picked player)
      • Dialog - Create a dialog button for Dialog labelled Your Dialog
Firstr Trigger would best compliment my second trigger. You need to have it set on elasped. Second trigger will call every unit owned by player, check if it is a hero, if it is, add the ability to hero for owner of player who clicked the button.

  • If button Is Clicked
    • Events
      • Dialog - A dialog button is clicked for Dialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Button[0]
        • Then - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
            • Loop - Actions
              • If (((Picked unit) is A Hero) Equal to True) then do (Unit - Add War Stomp to (Picked unit)) else do (Do nothing)
        • Else - Actions
          • Do nothing
You have to set up your variables like you had in last one I just didn't feel like it

I don't understand what your trying to do with your trigger or what it is not doing since you did not answer my earlier post. I have made a few dialogs and all have been based like this. Of course I set the button variables so you know if button[1] is clicked youd o this but on this example i did not.

The trigger with:
Unit - Add War Stomp to Hero[(Player number of (Triggering player))]

Does not work. Might seeem logical, but to me, add warstop to player number does not make sense to me. so his number is Player 1warstomp? not sure if i'm thinking right but i don't think that will work.
 
Level 5
Joined
Mar 17, 2005
Messages
135
No, I mean the dialog is displayed by the second triggers but I don't think the button variables ar good because they don't store the buttons, I tried removing the wait and everything you told me and it still doesn't work.

Your dialog buttons variables are good. Try what i did above using those same dialog button variables. maybe use same button creating trigger but make it time elasped and not entering hero to compliment my trigger.
 
Level 3
Joined
Feb 20, 2008
Messages
54
Well the idea is to choose a god, each god has a certain bonus, attack speed, defense, life steal etc, the problem with your trigger is that you it's possible that not all heroes are on map... and... it doesn't work anyway... I really can't understand why...
 
Status
Not open for further replies.
Top