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

Trouble with giving items.....

Status
Not open for further replies.
Level 2
Joined
Aug 17, 2005
Messages
22
Well, I'm making a map, and a large idea for my map is the ability to order items from the town instead of walking there, because it could be quite far.

Anyway, what I've done is I've spawned the unit, for player 11 who is the town, and not player controlled, and given it the item in the town, but I can't get it to give the item to the player owned triggering unit.

Here is my trigger
-Events

Unit - A unit finishes casting an ability

-Conditions

(Ability being cast) Equal to Cow
((Owner of (Triggering unit) Current Gold) Greater than or equal to 200

-Actions

Player - Add -200 to (Owner of (Triggering unit)) Current gold
Unit - Create 1 Animal Transporter for Player 11 at (Center of Floating Text 01) facing default......
Hero - Create Cow and give it to (Last created unit)
Unit - Order (Last created unit) to give (Last Created item) to (Triggering unit)



I've played around with a few other trigger commands, but the unit either stays still or walks to the triggering unit and does nothing.

Also, DG is allied from and to every player, and has vision of every player. Anyway, so I just need to know what commands to use to make it give the item to the triggering unit, while not leaving an opening for another unit to become the last created unit. I don't want there to be any problems if some people order two items close together one right after the other.

Thanks in advance for your help.
 
Status
Not open for further replies.
Top