• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Doesn't Receive the Item

How can i receive the Item!?

  • Hm...

    Votes: 0 0.0%
  • Beginner?

    Votes: 2 100.0%

  • Total voters
    2
  • Poll closed .
Status
Not open for further replies.

RedLord

R

RedLord

Hello!
MY QUESTION IS: The Unit can't receive Why!? :(

My Question is how Can I receive the item, example If someone clicked the first dialog button, I want to create a (ITEM) AND GIVE IT TO unit who clicked the button...:(

upload_2016-7-9_0-40-32.png



P.S Still a Beginner.. :)
 
upload_2016-7-9_2-27-31.png


You mean like that?

Doesn't work too ....
 

Attachments

  • upload_2016-7-9_2-20-25.png
    upload_2016-7-9_2-20-25.png
    8.4 KB · Views: 52
You must specify the unit first by storing it (the unit you want to give the item) into a variable and also, you should do this for all players.
What do you mean? should i fix these??
upload_2016-7-9_2-29-30.png


But those two are computers..
 
Have you specified who are the units stored inside the HeroUnit variable?
If you haven't, you should.

For example:
HeroUnit[1] = Demon Hunter
HeroUnit[2] = Blademaster

or whoever it is. The array [1] or [2] determines which player owns the unit.
so HeroUnit[1] = Demon Hunter, it belongs to Player 1 (Red).
And HeroUnit[2] = Blademaster, it belongs to player 2 (Blue).
 
Have you specified who are the units stored inside the HeroUnit variable?
If you haven't, you should.

For example:
HeroUnit[1] = Demon Hunter
HeroUnit[2] = Blademaster

or whoever it is. The array [1] or [2] determines which player owns the unit.
so HeroUnit[1] = Demon Hunter, it belongs to Player 1 (Red).
And HeroUnit[2] = Blademaster, it belongs to player 2 (Blue).
upload_2016-7-9_2-50-26.png


Like that?? So you said should i use Unit-Type?

upload_2016-7-9_2-48-46.png


But the HeroUnit doesn't show here, because the variable i used is Unit-type...:(
 

Attachments

  • upload_2016-7-9_2-48-6.png
    upload_2016-7-9_2-48-6.png
    4.7 KB · Views: 56
the variable has to be of type unit, not unit-type, as Rheiko and Chaosy told you. He just wanted to give you an example, that it can be whatever unit you want to be able to receive the item.
It depends on what you want to do.
As you said in the beginning "the unit that clicked the button", does the player have more than one unit and are they all allowed to receive the item?
 
Status
Not open for further replies.
Back
Top