• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Dialog for Gaining Attributes

Status
Not open for further replies.
Level 2
Joined
Apr 15, 2009
Messages
13
  • Open Dialog
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Skill Gain
    • Actions
      • Dialog - Show Dialog_Attributes for (Owner of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Agi_5
        • Then - Actions
          • Hero - Modify Agility of (Triggering unit): Add 5
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Int_5
            • Then - Actions
              • Hero - Modify Intelligence of (Triggering unit): Add 5
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Str_5
                • Then - Actions
                  • Hero - Modify Strength of (Triggering unit): Add 5
                • Else - Actions
                  • Do nothing
Can somebody tell me what is wrong here , i get the dialog show but i dont get attributes gain???
Oh and here is variables set in map loading ,
  • Dialog - Create a dialog button for Dialog_Attributes labelled Intelegence + 5
  • Set Int_5 = (Last created dialog Button)
  • Dialog - Create a dialog button for Dialog_Attributes labelled Strenght + 5
  • Set Str_5 = (Last created dialog Button)
  • Dialog - Create a dialog button for Dialog_Attributes labelled Aggility + 5
  • Set Agi_5 = (Last created dialog Button)
I know my english suck :)
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

Try this 3 triggers:

  • Set Dialog
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Dialog - Create a dialog button for Dialog labelled Str + 5
      • Set Dialog_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled Agi +5
      • Set Dialog_Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled Int + 5
      • Set Dialog_Button[3] = (Last created dialog Button)
  • Open Dialog
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Skill Gain
    • Actions
      • Set TempUnit = (Casting unit)
      • Dialog - Show Dialog for (Owner of (Casting unit))
  • Show Dialog
    • 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 Dialog_Button[1]
        • Then - Actions
          • Hero - Modify Strength of TempUnit: Add 5
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog_Button[2]
        • Then - Actions
          • Hero - Modify Agility of TempUnit: Add 5
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog_Button[3]
        • Then - Actions
          • Hero - Modify Intelligence of TempUnit: Add 5
        • Else - Actions
1) The Variable "TempUnit" is just a normal Unit variable with NO Array

2) If it bugged ( I think you use more then one players) you should create the "TempUnit" with Array[PlayerNumber] and at the 2nd Trigger use the Condition "If Owner of Casting Unit equal to Player Red" and the Action Set TempUnit[1] = Casting Unit / For Player Blue TempUnit[2] and so on ...


This is my way --- ofc there will be other/better ways ;)
 
Status
Not open for further replies.
Top