HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

buy item order

05-05-2006, 04:11 PM#1
Doomhammer
how to order a hero to buy an item from a shop?
is it the same as "Issue Give Item Order" ? I'm just wondering since it does not imply the unit actually buying the item, i.e. pay for it.
05-05-2006, 04:15 PM#2
Captain Griffen
Units do not buy items. Players do, and it is allocated by the select hero ability.
05-05-2006, 04:27 PM#3
Doomhammer
vague answer...would you please specify? What is the order to make hero "h" buy item "it" from shop "sh" ?
05-05-2006, 04:48 PM#4
Captain Griffen
Quote:
Units do not buy items. Players do

How much less vague can you get?
05-05-2006, 05:07 PM#5
Doomhammer
I hope there's no misunderstanding here. I'm about to trigger an AI for my map to make a hero buy and use potions of health/mana when low on life/mana.

among the action type "Player" (let's go GUI first) there is nothing such as
"Actions - Order Player to buy Item for Hero from Shop"
05-05-2006, 05:11 PM#6
Thunder_Eye
You need to check if the player has the necessary gold, then create an item of that type for him and substract the gold from him,
05-05-2006, 05:26 PM#7
Doomhammer
sort of works around the whole thing - Yeah, why not use the back entrance when you can't find the key for the front door.
I'll prolly go with that then. But what's the main key then, Cap' Griffen, if there is any?
05-05-2006, 05:34 PM#8
Thunder_Eye
No there isnt any, thats what he means with "player buy, units dont".
You cant order the unit to buy an item, you'll have to do it the way I suggested(or if there is any other way but I dont think so)
05-05-2006, 08:24 PM#9
moyack
Quote:
Originally Posted by Captain Griffen
Units do not buy items. Players do, and it is allocated by the select hero ability.

But, when you see a computer AI buying a globin Zeppelin, it can be done at least with jass, I suppose. or maybe the AI use the trick that Thunder_Eye propose (BTW, I like your solution Thunder_Eye).
05-05-2006, 09:54 PM#10
shadow1500
Use search to find the answer, this has been asked before: http://www.wc3campaigns.net/showthread.php?t=81688.
05-05-2006, 11:21 PM#11
The)TideHunter(
Orrrr... you could give items hotkeys (like they should have anyway) and order a player to select the hotkey, so in effect, buy the item, if he dosent have enough gold, the "Not enough gold" sound and text will display, its just like a normal player hitting the hotkey, but a computer is doing it.
05-05-2006, 11:50 PM#12
shadow1500
You dont need to know the hotkeys for the items to use the method i mentioned above.
05-06-2006, 06:42 AM#13
BertTheJasser
Just use shadow1500's link above.