• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Is Blizzard For Real? (Identifying Negative Numbers)

Status
Not open for further replies.
Sc2 Editor's Logic Is Broken?

SOLVED

Edit: The problem was indeed with absolute values. Even changing the y part of the "is x equal to y" there was still an "is x absolute" function in the trigger. I didn't even think of that.
Thank you all for your help.

  • Deal Damage
    • Events
    • Local Variables
    • Conditions
    • Actions
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Or
            • Conditions
              • (Abs(Enemy Shields)) < 0
              • (Abs(Enemy Shields)) == 0
        • Then
          • Variable - Modify Enemy Hull: - Player Weapon Effective Damage
          • Variable - Set Player Current Weapon Effective Cooldown = (Abs(Player Current Weapon Cooldown))
        • Else
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Abs(Enemy Shields)) > 0
        • Then
          • Variable - Modify Enemy Shields: - Player Weapon Effective Damage
          • Variable - Set Player Current Weapon Effective Cooldown = (Abs(Player Current Weapon Cooldown))
        • Else
  • Deal Damage
    • Events
    • Local Variables
    • Conditions
    • Actions
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Or
            • Conditions
              • Enemy Shields < 0
              • Enemy Shields == 0
        • Then
          • Variable - Modify Enemy Hull: - Player Weapon Effective Damage
          • Variable - Set Player Current Weapon Effective Cooldown = (Abs(Player Current Weapon Cooldown))
        • Else
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Enemy Shields > 0
        • Then
          • Variable - Modify Enemy Shields: - Player Weapon Effective Damage
          • Variable - Set Player Current Weapon Effective Cooldown = (Abs(Player Current Weapon Cooldown))
        • Else
  • [/hidden]
When identifying an integer variable, it considers negative numbers as positive? What the f***?

I tried changing the hinge value from 0 to 1 but it had no effect (I thought maybe it just considered 0 a negative number).

Edit: This does not work either..

  • Deal Damage
    • Events
    • Local Variables
    • Conditions
    • Actions
      • General - If (Conditions) then do (Actions) else do (Actions)
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Or
            • Conditions
              • (Abs(Enemy Shields)) < 0
              • (Abs(Enemy Shields)) == 0
        • Then
          • Variable - Modify Enemy Hull: - Player Weapon Effective Damage
          • Variable - Set Player Current Weapon Effective Cooldown = (Abs(Player Current Weapon Cooldown))
        • Else
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Abs(Enemy Shields)) > 0
        • Then
          • Variable - Modify Enemy Shields: - Player Weapon Effective Damage
          • Variable - Set Player Current Weapon Effective Cooldown = (Abs(Player Current Weapon Cooldown))
        • Else
No matter what, unless the enemy shields lands exactly on 0 it will deal damage to the shields.

Which is funny because in both instances I have it set to greater than or less than 0, not 0 itself.

THIS FUCKING LOGIC IS BROKEN!!!

I'd make a trigger to identify the negative amount to shields and apply it to hull but hows that possible if the game cant recognize negative numbers (even though in game it shows -## as current values).
 
Last edited:

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,296
You are aware that Abs is short of absolute which is the magnitude of a vector?

A negative number is a vector with magnitude equal to its absolute towards -180 degrees (or pi radians). Magnitudes by their vary nature will always be positive as a negative magnitude is the same vector flipped by 180 degrees (or pi radians) in either direction.
 
Status
Not open for further replies.
Top