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

Status
Not open for further replies.
Level 2
Joined
Feb 6, 2012
Messages
14
Hi there.. i am in need of help again.. i am very new to the world editor..its been a week since i have started using it. I want to make a dialog box for my game.. where i want the players to get an option upon the death of their hero..whether they want the hero to spwan at level1 which will cost them less resource of course...or to respwan their hero's at the same level...at the time of his death....this will cost them more resource to respawn the same hero at the time of his death. I went through the tutorials..to see how to make a dialog box.. i am good with that...what i am having a difficulty is with the trigger to set conditions for player to make their hero spwan at level 1 or respwan retaining the level at the time of his death.
here's what i got so far
  • Dialog
    • Events
      • Unit - A unit Dies
    • Conditions
      • (((Triggering unit) is A Hero) Equal to True) and ((All units of (Units owned by Player 1 (Red)) are in (Playable map area)) Equal to True)
    • Actions
      • Dialog - Clear MyDialog
      • Dialog - Change the title of MyDialog to Would you like to r...
      • Dialog - Create a dialog button for MyDialog labelled Yes
      • Set DialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for MyDialog labelled No
      • Set DialogButton[2] = (Last created dialog Button)
      • Dialog - Show MyDialog for Player 1 (Red)
i understand i have to make a couple of more triggers to make "Yes" and the "No" buttons to work. Can someone help ?? pleaseeeee

P.S heros in my game are like units...player can train multiple heros from the Altar of Kings..
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 041
    • Events
      • Dialog - A dialog button is clicked for *dialog*
    • Conditions
    • Actions
      • Hero - Instantly revive *unit* at (Center of (Playable map area)), Hide revival graphics
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to *button to revive at level 1*
        • Then - Actions
          • Hero - Set *unit* Hero-level to 1, Hide level-up graphics
        • Else - Actions
(Center of (Playable map area)) leaks -> http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Level 2
Joined
Feb 6, 2012
Messages
14
  • Untitled Trigger 041
    • Events
      • Dialog - A dialog button is clicked for *dialog*
    • Conditions
    • Actions
      • Hero - Instantly revive *unit* at (Center of (Playable map area)), Hide revival graphics
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to *button to revive at level 1*
        • Then - Actions
          • Hero - Set *unit* Hero-level to 1, Hide level-up graphics
        • Else - Actions
(Center of (Playable map area)) leaks -> http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

Well in my game the units are not already on the map except for the worker units....Players can train heroes from the Altar of Kings....by using their gold..
What i am trying to do is..give the players an option..at the hero's death...to train a new hero from the altar of king or to respawn the dead hero at the same level..
For example...I am player 1....and at the start of the game i have 250 gold...i don't have any hero's in the map yet..so i train 2 support heroes and go down to hunt some neutral creeps..after killing some creeps my heroes level up to level 2.. and then i train a range hero and put him also to kill creeps.. while in combat one of my level 2 hero dies..and i get a dialog box "Do you want to respawn your hero at same level? "Yes /No". If "Yes" the same support..hero respwans near the player 1's altar of kings. If "No" then do nothing because then the player can train any hero from the altar of kings of his choice..

Well this is what i have done...this trigger works fine for 1st time...but it wont respwan the hero's after..so considering the above example...my 1st support hero will respwan at the same level..but after that...my heroes wont spawn at the same level if i choose "yes" on the dialog box to respwan them... i am trying to make the trigger work for every time a hero dies.

  • Dialog Player1
    • Events
      • Unit - A unit Dies
    • Conditions
      • (((Triggering unit) is A Hero) Equal to True) and ((All units of (Units owned by Player 1 (Red)) are in (Playable map area)) Equal to True)
    • Actions
      • Wait 4.00 seconds
      • Dialog - Clear MyDialogP1
      • Dialog - Change the title of MyDialogP1 to Would you like to r...
      • Dialog - Create a dialog button for MyDialogP1 labelled Yes
      • Set DialogButtonP1[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for MyDialogP1 labelled No
      • Set DialogButtonP1[2] = (Last created dialog Button)
      • Dialog - Show MyDialogP1 for Player 1 (Red)
  • Dialog Buttons Player1
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Triggering unit) is A Hero) Equal to True
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Trigger - Add to Dialog Buttons Player1 <gen> the event (Dialog - A dialog button is clicked for MyDialogP1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButtonP1[1]
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at (Center of Player1 hero respwan <gen>), Hide revival graphics
        • Else - Actions
I also want to set a different amount of gold requirement for every level..
 
Last edited:
Level 6
Joined
Dec 21, 2011
Messages
237
Well, you are very sad. I just help you to bumping it to upper :D.
Sorry, i can't help you for solved this :/
 
Level 2
Joined
Feb 6, 2012
Messages
14
Well it seems like...what i am planning to do is quite impossible using GUI...so i have now decided to change it a bit..Now what i am trying to do is...When a unit dies...bring up the dialog box....with the "yes" and a "no" button..if the button clicked is yes...then revive hero instantly...for 500 gold..and set location of the revived hero and ping the minimap...on that location...and if clicked no...do nothing..then the player can train the unit of his choice from the altar of king.. i am also attaching my map with this comment...so that it becomes easy to know what i am trying to do...
http://www.fileserve.com/file/X6XnqYu/TowerofArrakis_v1.2bug
 
Level 2
Joined
Feb 6, 2012
Messages
14
Init trigger:
Set up dialog thingies

Unit dies:
Show dialog for triggering player
Don't add any events here

Dialog button clicked trigger:
if button == yes then revive

Very much possible in GUI.


what should i select in hero...i made 3 triggers
  • Dialog Player1
    • Events
      • Unit - A unit Dies
    • Conditions
      • (((Triggering unit) is A Hero) Equal to True) and ((All units of (Units owned by Player 1 (Red)) are in (Playable map area)) Equal to True)
    • Actions
      • Wait 3.00 seconds
      • Dialog - Clear MyDialogP1
      • Dialog - Change the title of MyDialogP1 to Would you like to r...
      • Dialog - Create a dialog button for MyDialogP1 labelled Yes
      • Set DialogButtonP1[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for MyDialogP1 labelled No
      • Set DialogButtonP1[2] = (Last created dialog Button)
      • Dialog - Show MyDialogP1 for Player 1 (Red)
      • Hero - Instantly revive (Triggering unit) at (Center of Player1 hero respwan <gen>), Hide revival graphics
  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
      • (((Triggering unit) is A Hero) Equal to True) and ((Owner of (Triggering unit)) Equal to Player 1 (Red))
    • Actions
      • Dialog - Show MyDialogP1 for Player 1 (Red)
  • Untitled Trigger 003
    • Events
      • Dialog - A dialog button is clicked for MyDialogP1
    • Conditions
      • (Clicked dialog button) Equal to DialogButtonP1[1]
    • Actions
what do i select my hero as, in the 3rd trigger...because there is no triggering unit.. in the 3rd trigger..as the event is of a dialog button click...
 
Level 2
Joined
Feb 6, 2012
Messages
14
There are 3 factions in my game..each faction has 3 heroes..the heroes are lik units in my game..the players can train as many heroes they want depending on their resources...does that mean i will have to make unit array for all heroes ..
 
Status
Not open for further replies.
Top