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

Change positive variable to negative in GUI

Status
Not open for further replies.

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
In both JASS and GUI, you can type out the number "10" or the number "-10" when
you need a positive or negative variable, respectively.

However, in JASS you can also negate a variable with "-variableName" to make it a
negative if positive, and vice-versa. I can't see a practical way to do this in GUI. I
can only do something sloppy and retarded like:

"0 - variableName" or
"variableName * -1"

Is there a better way to do this in GUI without using custom script?
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Maths in GUI are lame, that is, for a simple formula you have to kill your mouse with many clicks.
I'm wondering if there is a negative function in GUI ? (more clicks but it's GUI)
I think not though, since i was an hardly defender and user of GUI few years ago and don't remember something like that.
 
Level 13
Joined
Sep 13, 2010
Messages
550
I say no there is no optional way... 4 ways for that:
1. YourVar - ( YourVar * 2 )
2. YourVar * -1
3. set udg_YourVar = -udg_YourVar
4. can be made with enabling UMSWE: YourVar = ( now scroll to JASS ) "-udg_YourVar"

The best solution: go to Jass :p
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
If you are familiar with my work you'd know that I was for quite some time a strictly-JASS/vJass person, so recommending using JASS for this is redundant.

Especially when I asked "Is there a better way to do this in GUI without using custom script?"

But this thread is "unsolved" -there's sadly no way to do it in GUI without the weirdness.
 
Status
Not open for further replies.
Top