• 🏆 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!

Negative resources

Status
Not open for further replies.
Level 13
Joined
Nov 4, 2006
Messages
1,239
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 39
Joined
Feb 27, 2007
Messages
5,016
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 64
Joined
Aug 10, 2018
Messages
6,546
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