been awhile since my calculus days;
I'm currently using a real variable as a timer, deducting 0.2 seconds from it at each interval and updating/displaying it in the form of a floating text.
however, I would like it so that each time the real is equal to a whole number (integer) to change the floating text colour to white, instead of red. So it appears to be almost blinking.
This is what I've tried, can somebody help me please!
It's getting late and my head is hurting, but I could have sworn that this was right. however worldedit doesnt seem to agree with me =P
I'm currently using a real variable as a timer, deducting 0.2 seconds from it at each interval and updating/displaying it in the form of a floating text.
however, I would like it so that each time the real is equal to a whole number (integer) to change the floating text colour to white, instead of red. So it appears to be almost blinking.
This is what I've tried, can somebody help me please!
Trigger:
- Fortify Timer
- Events
- Time - Every 0.20 seconds of game time
- Conditions
- Actions
- Game - Display to Player Group - Player 1 (Red) for 0.33 seconds the text: Fortify Timer is on
- For each (Integer A) from 1 to FO_Max, do (Actions)
- Loop - Actions
- -------- - - - - - - - --------
- -------- - - - - - - - --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- FO_Time[(Integer A)] Greater than 0.00
- Then - Actions
- -------- - - - - - - - --------
- -------- - - - - - - - --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (FO_Time[(Integer A)] mod 1.00) Equal to 0.00
- Or - Any (Conditions) are true
- Then - Actions
- Game - Display to Player Group - Player 1 (Red) for 0.50 seconds the text: MOD Trigger
- Floating Text - Change the color of FO_Floating_Text[(Integer A)] to (100.00%, 100.00%, 100.00%) with 0.00% transparency
- Else - Actions
- Floating Text - Change the color of FO_Floating_Text[(Integer A)] to (100.00%, 0.00%, 0.00%) with 0.00% transparency
- If - Conditions
- -------- - - - - - - - --------
- -------- - - - - - - - --------
- Floating Text - Change text of FO_Floating_Text[(Integer A)] to (Substring((String((FO_Time[(Integer A)] - 0.20))), 1, 4)) using font size 11.00
- Set FO_Time[(Integer A)] = (FO_Time[(Integer A)] - 0.20)
- -------- - - - - - - - --------
- -------- - - - - - - - --------
- Else - Actions
- Floating Text - Destroy FO_Floating_Text[(Integer A)]
- If - Conditions
- Loop - Actions
- Events
It's getting late and my head is hurting, but I could have sworn that this was right. however worldedit doesnt seem to agree with me =P
Trigger:
- (FO_Time[(Integer A)] mod 1.00) Equal to 0.00