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

Help with this trigger please

Status
Not open for further replies.
Level 13
Joined
Jun 3, 2011
Messages
1,058
Hi guys as you can see i have created a trigger that connects a dialog and now when i click the COok dialog it dosen't do anything

  • Choose
    • Events
      • Unit - A unit comes within 256.00 of Cooking Pit 0633 <gen>
    • Conditions
    • Actions
      • Dialog - Clear AAA_Profession_Dialog
      • Dialog - Change the title of AAA_Profession_Dialog to Choose the item you...
      • Dialog - Create a dialog button for AAA_Profession_Dialog labelled Meat
      • Set AAA_Profession_DialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for AAA_Profession_Dialog labelled Bread
      • Set AAA_Profession_DialogButton[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for AAA_Profession_Dialog labelled Cancel
      • Set AAA_Profession_DialogButton[2] = (Last created dialog Button)
      • Dialog - Show AAA_Profession_Dialog for (Owner of (Triggering unit))

  • Meat
    • Events
      • Dialog - A dialog button is clicked for AAA_Profession_Dialog
    • Conditions
      • (Clicked dialog button) Equal to AAA_Profession_DialogButton[1]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Item carried by (Triggering unit) of type |c00408080Uncooked Meat|r) is owned) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 0 and 10) Greater than or equal to 7
            • Then - Actions
              • Game - Display to (Player group((Owner of (Casting unit)))) the text: You Burnt your meat.
              • Item - Remove (Item carried by (Triggering unit) of type |c00408080Uncooked Meat|r)
            • Else - Actions
              • Item - Remove (Item carried by (Triggering unit) of type |c00408080Uncooked Meat|r)
              • Hero - Create |c00408080Cooked Meat|r and give it to (Triggering unit)
              • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You have sucsessful...
        • Else - Actions
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Required Uncooked M...
 

Attachments

  • Meat Helpo.png
    Meat Helpo.png
    33.5 KB · Views: 63
Last edited:
Level 12
Joined
Sep 11, 2011
Messages
1,176
Ahh you mean the trigger form?

right click on the title of the trigger above the event (in your case it's Meat), select Copy As Text.

[Trigger]Paste here[/Trigger]

EDIT : it might be because the trigger didn't meet the condition.

show us the trigger which creates the dialog button. if you haven't create the dialog button and set it to variable, you should.
 
Level 13
Joined
Jun 3, 2011
Messages
1,058
create the dialog on map initialization, don't create on an event.
they will be created all over again when the unit is within the range of those NPC.

and as i said in my first post, i think that the condition is not meet.

Why? and the trigger turn on when i come to the unit what's wrong with that?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Why? and the trigger turn on when i come to the unit what's wrong with that?

you don't understand, what i meant is when the unit is within the range of NPC, the dialog will be created.

then when the unit is within the range of the NPC once again, another dialog will be created, so there will be a total of 6 dialogs. and it will continue to the power of 3 number of dialogs. that's why you should create the dialog on the map initialization.
 
Level 18
Joined
May 11, 2012
Messages
2,103
you don't understand, what i meant is when the unit is within the range of NPC, the dialog will be created.

then when the unit is within the range of the NPC once again, another dialog will be created, so there will be a total of 6 dialogs. and it will continue to the power of 3 number of dialogs. that's why you should create the dialog on the map initialization.

or you can turn off the dialog trigger after it's executed
 
Status
Not open for further replies.
Top