• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

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.. :)
 

RedLord

R

RedLord

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: 37

RedLord

R

RedLord

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..
 

Rheiko

Spell Reviewer
Level 25
Joined
Aug 27, 2013
Messages
4,122
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).
 

RedLord

R

RedLord

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: 41
Level 14
Joined
Jul 1, 2008
Messages
1,314
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.
Top