- Joined
- Mar 25, 2008
- Messages
- 2,955
So, dear community
I stumbled upon a spellthread which also stated that people should avoid using Integer A for loops in gui
The reason for this was that there'd be a low probability that it 'bugs'
The fact that they 'bug' (overlap in this case and run one time too much) seemed strange, so I put this trigger
and copied it a couple of times.
Running warcraft after like 20 minutes showed me this(I removed the call BJDebugMsg):
which is quite a proof that the int never turned 11 and therefore no units were created, means Integer A does not bug or overlap or run too often.
If you want to test this for yourself, I uploaded a version of the testmap as attachment - copy the triggers if you want.
I stumbled upon a spellthread which also stated that people should avoid using Integer A for loops in gui
The reason for this was that there'd be a low probability that it 'bugs'
The fact that they 'bug' (overlap in this case and run one time too much) seemed strange, so I put this trigger
-
loop
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
- Set int = (int + 1)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- int not equal to (!=) 10
-
Then - Actions
- Game - Display to (All players) the text: |cffff0000OMG U R R...
- Set point = (Center of (Playable map area))
- Unit - Create 1 Soldat for Player 1 (Red) at point facing default building degrees
- Custom script: call RemoveLocation(udg_point)
- Else - Actions
-
If - Conditions
- Set int = 0
-
For each (Integer A) from 1 to 10, do (Actions)
-
Events
and copied it a couple of times.
Running warcraft after like 20 minutes showed me this(I removed the call BJDebugMsg):
which is quite a proof that the int never turned 11 and therefore no units were created, means Integer A does not bug or overlap or run too often.
If you want to test this for yourself, I uploaded a version of the testmap as attachment - copy the triggers if you want.
Attachments
Last edited: