How negative Timer/User Data values work.

Discussion in 'Halo and Forge Discussion' started by cookies4you, Apr 23, 2015.

  1. cookies4you

    cookies4you Halo 3 Era
    Senior Member

    Messages:
    178
    Likes Received:
    93
    I made a giant research thread before, but since ForgeHub had a server fart, everything vanished.

    Anyhow, I'll just post the important bits to my findings, the results.

    Now, some of you utilizing Scripting Timers may have noticed that the Timer/User Data slot only goes up to 100 before switching to -100 and counting upwards to -1.

    If you've ever tested it, you'd know that -100 is not 101 seconds, but instead, a completely different number.

    Well, I did a bunch of tests and I figured out what those values represent.

    Value : Seconds
    0 : 0 seconds
    +25 : 25 seconds
    +50 : 50 seconds
    +100 : 100 seconds
    -100 : 156 seconds
    -99 : 157 seconds
    -90 : 166 seconds
    -80 : 176 seconds
    -60 : 196 seconds
    -40 : 216 seconds
    -20 : 236 seconds
    -10 : 246 seconds
    -1 : 255 seconds

    Strange, right? Well, the explanation is pretty simple.

    Timers actually have a maximum delay of 255 seconds. Entering the negative numbers adds 55 seconds to that delay in order to reach 255. In other words, the TUD value of -100 would effectively be 156.

    This can be used for a variety of things, but keep in mind that the TUD values of 101 through 155 are still unusable.

    The easiest way to figure out what your value is to add the negative number to 256. TUD value -50 will be 206, -32 will be 224, -55 will be 200, and so on and so forth.

    Anyways, I hope those of you reading this can put it to good use.

    Good luck.
     
    Egggnog, WAR, buddhacrane and 2 others like this.
  2. a Chunk

    a Chunk Blockout Artist
    Forge Critic Wiki Contributor Senior Member

    Messages:
    2,670
    Likes Received:
    7,152
    This will make some of the longer Static Weapon times easier to do. Just wish there wasn't a gap between 100 and 156. :salty:
     
  3. cookies4you

    cookies4you Halo 3 Era
    Senior Member

    Messages:
    178
    Likes Received:
    93
    For a 120 second timer, you can simply use a Timer Toggle to cycle its broadcast every 60 seconds. It'll take 120 seconds to spawn in a weapon since it takes 60 seconds to turn on and another 60 to turn off.
     
    a Chunk likes this.
  4. buddhacrane

    buddhacrane Ancient
    Senior Member

    Messages:
    1,204
    Likes Received:
    116
    Not for Static Weapon Timers. You would initially get a 60 second delay the first time your weapon spawns in, followed by 120 second delays for subsequent spawn-ins.

    Also, because you would be leaving the Timer's channel on for a whole 60 seconds, if the weapon hadn't been picked up on the previous loop then as soon you do pick the weapon up it will immediately spawn in another one, because the broadcast channel would still be on (that's why in my static weapon timers I only leave the broadcast channel that spawns the weapon in on for 1 second) - not weapon spawning behaviour you'd generally want.
     
    #4 buddhacrane, Apr 23, 2015
    Last edited: Apr 23, 2015
  5. WAR

    WAR Cartographer
    The Creator Forge Critic

    Messages:
    1,568
    Likes Received:
    3,893
    darn, no 180...this would have been great to set rockets at 3 minutes. Guess we're still forced to use previous methods for that. More :salty:
     
  6. a Chunk

    a Chunk Blockout Artist
    Forge Critic Wiki Contributor Senior Member

    Messages:
    2,670
    Likes Received:
    7,152
    You should be able to get a 180 second respawn rate by setting the timer to -76. The post only lists time in 10 second increments, but any time 156 and 255 is possible. The only times missing are the range from 100 to 155.
     
    WAR likes this.
  7. WAR

    WAR Cartographer
    The Creator Forge Critic

    Messages:
    1,568
    Likes Received:
    3,893
    ah, nice. I thought the values listed above were the only ones avail
     
  8. cookies4you

    cookies4you Halo 3 Era
    Senior Member

    Messages:
    178
    Likes Received:
    93
    If you want to get any number between 156 and 255, just use this formula:

    Z = Y - 256

    where

    Y = Desired Value
    Z = Timer/User Data value

    EX:

    Desired Value = 180

    Z = Y - 256

    Z = (180) - 256

    Z = -76

    Alright, I did the testing. Can confirm that Toggle Timers will not work.

    Ugh, I hate Halo's weapon spawn logic.
     
    #8 cookies4you, Apr 23, 2015
    Last edited: Apr 23, 2015
    Zombievillan likes this.
  9. Zombievillan

    Zombievillan Ancient
    Forge Critic Senior Member

    Messages:
    2,717
    Likes Received:
    3,623
    So now I don't need 4 timers just to get a 3 min. static Rocket launcher?
     

Share This Page