• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Change positive variable to negative in GUI

Status
Not open for further replies.
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
 
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