Wait vs. Timer

No_exit

Regular User (What is Custom User Title?)
Reaction score
40
Hey I have been doing some testing to see if Waits are reliable compared to timers and ...
Waits and Timers seem to be equally reliable (I'm not talking about 32 ticks/second timers here though).

To my big amazement the following 2 scripts kept displaying the UI message synchronized even tho the "Wait" trigger chokes my pc for about 0.2 seconds every time it runs.

Wait trigger:
Trigger:
  • Events
    • Game - Map initialization
    • Local Variables
      • i = 0 <Integer>
      • j = 0 <Integer>
    • Conditions
    • Actions
      • General - Repeat (Actions) forever
        • Actions
          • Variable - Modify i: + 1
          • General - Wait 0.5 Game Time seconds
          • UI - Display ("Waits: " + (Text(i))) for (All players) to Chat area
          • General - For each integer j from 1 to 500 with increment 1, do (Actions)
            • Actions
              • Unit - Create 1 Marine for player 1 at Start Location 001 using default facing (No Options)
              • Unit - Remove (Last created unit) from the game



Timer triggers:
Trigger:
  • Normal Timer
    • Events
      • Game - Map initialization
    • Local Variables
    • Conditions
    • Actions
      • Timer - Start SomeTimer as a Repeating timer that will expire in 0.5 Game Time seconds


Trigger:
  • Timer End
    • Events
      • Timer - SomeTimer expires
    • Local Variables
    • Conditions
    • Actions
      • Variable - Modify TimerCount: + 1
      • UI - Display ("Global Timer:" + (Text(TimerCount))) for (All players) to Chat area


Your thoughts / experiments?

Edit: w00t 100th post \o/
 

Cookiemaster

New Member
Reaction score
36
If only it could be tested in multiplayer. :(

But for your test results; it's no suprise that your pc chokes when you create and remove 500 units at once.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top