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

Status
Not open for further replies.
Level 6
Joined
Jul 18, 2009
Messages
200
My Dialog is Weird

I'm doing a map called Hero Arena v0.1(atm). But the dialog is wicked. Look at it


  • Dialog Button press
    • Events
      • Dialog - A dialog button is clicked for HeroDialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to HeroDialogButton[4]
        • Then - Actions
          • Set temp_Point = ((Picked player) start location)
          • Unit - Create 1 Blademaster Yuniko for (Picked player) at temp_Point facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_temp_Point)
        • Else - Actions
Leaks, anything wrong?

The dialog init:


  • DialoBox
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Dialog - Clear HeroDialog
      • Dialog - Change the title of HeroDialog to |c0000ff00H|c0015e9...
      • Dialog - Create a dialog button for HeroDialog labelled Yuniko Rawkiller
      • Set HeroDialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for HeroDialog labelled Pandaren Sorcerer
      • Set HeroDialogButton[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for HeroDialog labelled Voodo Hunter
      • Set HeroDialogButton[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for HeroDialog labelled Dark Ranger
      • Set HeroDialogButton[4] = (Last created dialog Button)
      • Dialog - Show HeroDialog for Player 1 (Red)
 
Level 13
Joined
Jun 22, 2004
Messages
783
It does not leak but it seems you refer to the wrong array in your in button variable.

  • (Clicked dialog button) Equal to HeroDialogButton[4]
looks like it should be

  • (Clicked dialog button) Equal to HeroDialogButton[1]
 
Level 21
Joined
Sep 22, 2007
Messages
2,772
It does not leak but it seems you refer to the wrong array in your in button variable.

  • (Clicked dialog button) Equal to HeroDialogButton[4]
looks like it should be

  • (Clicked dialog button) Equal to HeroDialogButton[1]

how do you know what array he wants i'm pretty sure its just one of them.

anyway your problem is that you're using picked player. seeing as you do not pick any players in that trigger (player group), you need to use triggering player, seeing as the player clicking the button triggers the trigger, he is the triggering player.
 
Status
Not open for further replies.
Top