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

Detecting not enough gold

Status
Not open for further replies.
Level 11
Joined
Sep 14, 2009
Messages
284
Hi. Is there anyway to detect via triggers when a unit tries to purchase an item but don't have enough gold?
Or would I have to make a custom price and purchase system entirely?

EDIT: The only way i can think of is to make an event "A unit is issued an order targeting an object", Condition "Issued order equal to <order string for (trying?) to purchase an item>".

But for this I would need the order string for a unit trying to purchasing an item. Anyone know how I can find this string?
 
Level 11
Joined
Sep 14, 2009
Messages
284
I tried detecting the order id by a jass script I found by displaying the order id when any order is given, but no order id is displayed when trying to purchase an item but dont having enough gold.
However, when I DID have enough gold I discovered that there is a different order id for each item in the shop... <.<

I think it's the name of unit, but I'm not sure.

That what is the name of the unit? The id or the string? o_O
I think id can only consist of numbers no?
 
Status
Not open for further replies.
Top