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

Status
Not open for further replies.
Level 8
Joined
Jul 10, 2018
Messages
383
  • Dilogs
    • Events
      • Unit - A unit enters Region 061 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Owner of (Triggering unit)) controller) Equal to User
      • (Number of units in (Units in Region 061 <gen>)) Equal to 1
    • Actions
      • Trigger - Turn off (This trigger)
      • Dialog - Clear BossFightDialog
      • Dialog - Show BossFightDialog for (Owner of (Triggering unit))
      • Dialog - Change the title of BossFightDialog to =BossFights=
      • Dialog - Create a dialog button for BossFightDialog labelled Maul
      • Set BossMaul = (Last created dialog Button)
      • Dialog - Create a dialog button for BossFightDialog labelled Grom Hellscream
      • Set GromBoss = (Last created dialog Button)
      • Trigger - Turn on (This trigger)









so i was tryin to do a random Dialog for Bosses and it won't WORK Except the Title any suggestions?
 
Last edited:
Level 8
Joined
Jul 10, 2018
Messages
383
You need to create the buttons before showing the dialog to the player.
So i did that but it doesn't Show the Title like =BossFights=
and when i click the Dialog Button of Maul it doesn't Teleport me there i did as you said.
  • Dilogs
    • Events
      • Unit - A unit enters Region 061 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Owner of (Triggering unit)) controller) Equal to User
      • (Number of units in (Units in Region 061 <gen>)) Equal to 1
    • Actions
      • Dialog - Create a dialog button for BossFightDialog labelled Maul
      • Set BossMaul = (Last created dialog Button)
      • Dialog - Create a dialog button for BossFightDialog labelled Grom Hellscream
      • Set GromBoss = (Last created dialog Button)
      • Dialog - Show BossFightDialog for (Owner of (Triggering unit))
      • Dialog - Change the title of BossFightDialog to =BossFights=
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on (This trigger)
and here is the Dialog Button Clicked for The maul Boss
  • Maul
    • Events
      • Dialog - A dialog button is clicked for BossFightDialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to BossMaul
        • Then - Actions
          • Unit - Move (Triggering unit) instantly to (Center of Region 059 <gen>)
          • Camera - Pan camera for (Picked player) to (Center of Region 059 <gen>) over 0.00 seconds
        • Else - Actions
          • Do nothing
And also it keeps Repeating The same Dialogs names every time i enter the Region.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
I do not see any randomness with your dialog button choices. Also you do not clear the dialog before creating new buttons hence it will keep adding additional buttons to it. Also you probably want to change the title of the dialog before showing it.

The maul button does not work because there is no concept of Triggering unit or Picked player in the block the functions are called. You probably mean to use Triggering player and to look up the appropriate unit for that player from an array and/or unit group.
 
Level 8
Joined
Jul 10, 2018
Messages
383
I do not see any randomness with your dialog button choices. Also you do not clear the dialog before creating new buttons hence it will keep adding additional buttons to it. Also you probably want to change the title of the dialog before showing it.

The maul button does not work because there is no concept of Triggering unit or Picked player in the block the functions are called. You probably mean to use Triggering player and to look up the appropriate unit for that player from an array and/or unit group.

and by Array/unit group you mean Variable?
 
Yes. You assign the unit to an array variable as the hero enters the region, then use the variable to move the unit after the dialog button has been pressed.
  • Dialog Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Dialog - Change the title of BossFightDialog to =BossFights=
      • Dialog - Create a dialog button for BossFightDialog labelled Maul
      • Set BossMaul = (Last created dialog Button)
      • Dialog - Create a dialog button for BossFightDialog labelled Grom Hellscream
      • Set GromBoss = (Last created dialog Button)
  • Dialog Activate
    • Events
      • Unit - A unit enters Region 061 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Owner of (Triggering unit)) controller) Equal to User
    • Actions
      • Set FighterUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Dialog - Show BossFightDialog for (Owner of (Triggering unit))
  • Dialog Click
    • Events
      • Dialog - A dialog button is clicked for BossFightDialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to BossMaul
        • Then - Actions
          • Unit - Move FighterUnit[(Player number of (Triggering player))] instantly to (Center of Region 059 <gen>)
          • Camera - Pan camera for (Triggering player) to (Center of Region 059 <gen>) over 0.00 seconds
        • Else - Actions
 
Level 8
Joined
Jul 10, 2018
Messages
383
Yes. You assign the unit to an array variable as the hero enters the region, then use the variable to move the unit after the dialog button has been pressed.
  • Dialog Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Dialog - Change the title of BossFightDialog to =BossFights=
      • Dialog - Create a dialog button for BossFightDialog labelled Maul
      • Set BossMaul = (Last created dialog Button)
      • Dialog - Create a dialog button for BossFightDialog labelled Grom Hellscream
      • Set GromBoss = (Last created dialog Button)
  • Dialog Activate
    • Events
      • Unit - A unit enters Region 061 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Owner of (Triggering unit)) controller) Equal to User
    • Actions
      • Set FighterUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Dialog - Show BossFightDialog for (Owner of (Triggering unit))
  • Dialog Click
    • Events
      • Dialog - A dialog button is clicked for BossFightDialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to BossMaul
        • Then - Actions
          • Unit - Move FighterUnit[(Player number of (Triggering player))] instantly to (Center of Region 059 <gen>)
          • Camera - Pan camera for (Triggering player) to (Center of Region 059 <gen>) over 0.00 seconds
        • Else - Actions
I do not see any randomness with your dialog button choices. Also you do not clear the dialog before creating new buttons hence it will keep adding additional buttons to it. Also you probably want to change the title of the dialog before showing it.

The maul button does not work because there is no concept of Triggering unit or Picked player in the block the functions are called. You probably mean to use Triggering player and to look up the appropriate unit for that player from an array and/or unit group.

Thanks for the Help Again works Like a Charm!!
 
Status
Not open for further replies.
Top