• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Dialog button clicked and Do something to unit

Status
Not open for further replies.
Level 9
Joined
Aug 7, 2009
Messages
380
Yah, hello.
How i can add a item to a unit when i press a dialog button ? That's all. I tried :
  • Trigger 1
  • Events
    • Map initialization
  • Conditions
  • Actions
    • Set DUMMY_ARRAY[(Player number of Player 2 (Blue))] = Dummy 0056 <gen>
    • Set DUMMY_ARRAY[(Player number of Player 3 (Teal))] = Dummy 0058 <gen>
    • Set DUMMY_ARRAY[(Player number of Player 4 (Purple))] = Dummy 0057 <gen>
And so on... for all other players
  • Trigger 2
  • Events
    • Time - Elapsed game time is 1.00 seconds
  • Conditions
  • Actions
    • Dialog - Change the title of Dialog to Pick One:
    • Dialog - Create a dialog button for Dialog labelled Shadow Orb
    • Set Button_ARRAY[1] = (Last created dialog Button)
    • Trigger - Turn on Trigger 3 <gen>
    • Dialog - Show Dialog for Player 2 (Blue)
And then...
  • Trigger 3
  • Events
    • Dialog - A dialog button is clicked for Dialog
  • Conditions
    • (Clicked dialog button) Equal to Button_ARRAY[1]
  • Actions
    • Hero - Create Shadow Orb and give it to DUMMY_ARRAY[(Player number of (Triggering player))]
Problem: Unit does not have item when i clicked button
I really think problem in this DUMMY_ARRAY[(Player number of (Triggering player))]. So, what can fix this?. Thanks and +rep in advance :ogre_haosis:
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
hmm ? simple version is like this ?

attachment.php
attachment.php


it works for me ?
 

Attachments

  • Dialog 1.PNG
    Dialog 1.PNG
    40.1 KB · Views: 216
  • Dialog 2.PNG
    Dialog 2.PNG
    38.3 KB · Views: 315
Status
Not open for further replies.
Top