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

Negative resources

Status
Not open for further replies.
Level 14
Joined
Nov 4, 2006
Messages
1,241
Is it possible somehow to allow resources to be negative with triggers?

i'm using this action:

  • Player - Add -5 to (Owner of (Killing unit)).Current gold
But it does not go below zero. I basically want to allow players in certain situations to spend more gold than they have.
 
Last edited:
Level 45
Joined
Feb 27, 2007
Messages
5,578
No, resources are not designed to work that way. Use/make a custom resource, set the 'zero point' for gold to be 100 or something so 85g would be -15, or grant the necessary gold to use when at 0 but keep track of the total negative gold with a multiboard so players know what they're actually at when below 0.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,878
With the custom UI stuff you can easily create your own Gold UI replacing the existing one.

Or you could do what Pyro said about tracking the gold from 0 and then moving up from there. But instead of a multiboard you could create a text frame that displays "-" to the left of the player's gold frame while they have negative gold. Although, at that point since you're tracking the gold anyway I would just make it full blown custom UI.
 
Status
Not open for further replies.
Top