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

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: 198
  • Dialog 2.PNG
    Dialog 2.PNG
    38.3 KB · Views: 298
Status
Not open for further replies.
Top