• 🏆 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 for trigger enabled dialog?

Status
Not open for further replies.
Level 2
Joined
Jun 1, 2007
Messages
14
Hi im super_chiken and i half-created Vampire's Life: http://www.hiveworkshop.com/resources_new/maps/4322

and i need a little help for version 1.1 because i need to make item fusing a little bit better so can some make this for me or explain it to me in idiot form?

What i need: (example)

Player1 steps into region A. Player 1 has an "ItemX" in inventory. A dialog box appears saying what you can make with ItemX. Player1 clicks "Button1" and ItemX and ItemY disappear and he gets ItemZ.

Also: Player1 triggers the dialog box. (he has Item X). Player1 clicks "Button2" but he doesn't have ItemA in his inventory. the dialog box closes and give an onscreen warning.

Can someone work there magic for me? :pal:

thanks
 
  • Item Create
    • Events
      • Unit - A unit enters (Your Region)
    • Conditions
      • ((Triggering unit) has an item of type (ItemX)) Equal to True
      • ((Triggering unit) has an item of type (ItemY)) Equal to True
    • Actions
      • Set Hero_With_Items = (Triggering unit)
      • Unit - Pause (Triggering unit)
      • Dialog - Show Variable_Dialog for (Owner of (Triggering unit))
      • Dialog - Change the title of Variable_Dialog to "What you can Build"
      • Dialog - Create a dialog button for Variable_Dialog labelled (Item1) + (Item2) =...
      • Set VariableDialogButton_WithArray[1] = (Last created dialog Button)
and

  • Button item
    • Events
      • Dialog - A dialog button is clicked for Variable_Dialog
    • Conditions
      • (Clicked dialog button) Equal to VariableDialogButton_WithArray[1]
    • Actions
      • Unit - Unpause Hero_With_Items
      • Item - Remove (Item carried by Hero_With_Items of type (ItemX))
      • Item - Remove (Item carried by Hero_With_Items of type (ItemY))
      • Hero - Create (ItemZ) and give it to Hero_With_Items
Your Welcome
 
Level 2
Joined
Jun 1, 2007
Messages
14
thank you!! not exactly what i wanted though but its really close. (I don't think i was clear enough on what i wanted)

i needed: HeroA enters Region (Hero has ItemX, but not ItemY) Brings up a dialog with, say 5 buttons. 1 requires X and A, 2 requires X and B etc. etc. HeroA clicks 1 but he doesn't have ItemA (gives warning). Hero A clicks 2 and have X and B. X and B disappear and he gets ItemN.

The second trigger was perfect for what i wanted to happen when the button got clicked. Maybe for the first trigger the condition doesn't have "Hero_With_Items has ItemY in inventory". whould that work?
 
Level 2
Joined
Jun 1, 2007
Messages
14
Hey, Just_Spectating... I did a modified version of your trigger in the map but it didn't work... i think it might be that i have no quotes areound the button names. can you tell me what's wrong? please

  • Fire Rune
    • Events
      • Unit - A unit enters Fuse <gen>
    • Conditions
      • (Item-type of (Item carried by (Triggering unit) of type Firestone)) Equal to Firestone
    • Actions
      • Set Hero_with_Items = (Triggering unit)
      • Unit - Pause (Triggering unit)
      • Dialog - Show Fire_Dialog for (Owner of (Triggering unit))
      • Dialog - Change the title of Fire_Dialog to Firestone Rune Fusi...
      • Dialog - Create a dialog button for Fire_Dialog labelled Stone + Lvl 1 Runed...
      • Set Firebutton1 = (Last created dialog Button)
      • Dialog - Create a dialog button for Fire_Dialog labelled Stone + Lvl 2 Runed...
      • Set Firebutton2 = (Last created dialog Button)
      • Dialog - Create a dialog button for Fire_Dialog labelled Stone + Lvl 3 Runed...
      • Set Firebutton3 = (Last created dialog Button)
 
Level 2
Joined
Jun 1, 2007
Messages
14
ok this isn't working out very well, but i knew it was going to be complicated so here goes.

Dialog Box Trigger:
  • Fire Rune
    • Events
      • Unit - A unit enters Fuse <gen>
    • Conditions
      • (Item-type of (Item carried by (Triggering unit) of type Firestone)) Equal to Firestone
    • Actions
      • Set Hero_with_Items = (Triggering unit)
      • Unit - Pause (Triggering unit)
      • Dialog - Change the title of Fire_Dialog to Firestone Rune Fusi...
      • Dialog - Create a dialog button for Fire_Dialog labelled Stone + Lvl 1 Runed...
      • Set Firebutton1 = (Last created dialog Button)
      • Dialog - Create a dialog button for Fire_Dialog labelled Stone + Lvl 2 Runed...
      • Set Firebutton2 = (Last created dialog Button)
      • Dialog - Create a dialog button for Fire_Dialog labelled Stone + Lvl 3 Runed...
      • Set Firebutton3 = (Last created dialog Button)
      • Dialog - Show Fire_Dialog for (Owner of (Triggering unit))
Fire Button 1 Trigger:
  • Firespawn Rune Fire 1
    • Events
      • Dialog - A dialog button is clicked for Fire_Dialog
    • Conditions
      • (Clicked dialog button) Equal to Firebutton1
    • Actions
      • Unit - Unpause Hero_with_Items
      • Item - Remove (Item carried by (Triggering unit) of type Firestone)
      • Item - Remove (Item carried by (Triggering unit) of type Lesser Runedust)
      • Hero - Create Firespawn Rune [|cffFF0000Fire Level 1|r] and give it to (Triggering unit)
After clicking button 1 (with the required items) the box closes out and nothing happens. 2nd try shows the attached picture. Then my player is indefinatly paused and i can't do anything.
 

Attachments

  • untitled.jpg
    untitled.jpg
    80.9 KB · Views: 146
you cant use triggering unit for the Dialog button is clicked. use the Hero_With_Items instead. also make it an if then else action. Also you should make the buttons in an array so you dont have to make several different variables.

ill post a demo
  • Dialog button clicked
    • Events
      • Dialog - A dialog button is clicked for Fire_Dialog
    • Conditions
      • (Clicked dialog button) Equal to Firebutton[1]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero_With_Items has an item of type (Item X)) Equal to True
          • (Hero_With_Items has an item of type (Item Y)) Equal to True
        • Then - Actions
          • Item - Remove (Item carried by Hero_With_Items of type (Item X))
          • Item - Remove (Item carried by Hero_With_Items of type (Item Y))
          • Hero - Create (Item Z) and give it to Hero_With_Items
          • Unit - Unpause Hero_With_Items
        • Else - Actions
          • Game - Display to (Player group((Owner of Hero_With_Items))) the text: You do not have the...
 
Status
Not open for further replies.
Top