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

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 64
Joined
Jan 18, 2005
Messages
27,202
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