The app won't call any Update function every frame? O rly?
Posted: Thu Aug 10, 2006 9:56 am
This code checks the CIS reinforcment count every 10 milliseconds. Just a work around I'd thought I'd post just in case no one else thought of it. . 
The CIS ticket count effectively never falls below ten, unless over 9 units are killed within the same 10 ms. Even units killed by the same grenade die further spaced out than that, right?
Thanks to Xwingguy and zerted for starting me off with coding.
With this code
--creates the EmergTroops_CIS timer
CreateTimer("EmergTroops_CIS")
SetTimerRate("EmergTroops_CIS", 100)
SetTimerValue("EmergTroops_CIS", 1)
--when a timer ends
OnTimerElapse(
function(post)
if GetReinforcementCount("2") == 9 then
SetReinforcementCount ("2", 10)
SetTimerValue("EmergTroops_CIS", 1)
StartTimer("EmergTroops_CIS")
end,
--the timer this OnTimerElapse() is 'connected' to
"EmergTroops_CIS"
--closes OnTimerElapse()
)
--start the EmergTroops_CIS timer
StartTimer("EmergTroops_CIS")
The CIS ticket count effectively never falls below ten, unless over 9 units are killed within the same 10 ms. Even units killed by the same grenade die further spaced out than that, right?
Thanks to Xwingguy and zerted for starting me off with coding.