• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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