Page 1 of 1

The app won't call any Update function every frame? O rly?

Posted: Thu Aug 10, 2006 9:56 am
by Ace_Azzameen_5
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. . :roll:

--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")
With this code
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.

RE: The app won

Posted: Thu Aug 10, 2006 10:35 am
by Rekubot
I don't really understand what we need this for. Does this make the CIS reinforcement count infinite or something?

RE: The app won

Posted: Thu Aug 10, 2006 3:03 pm
by [RDH]Zerted
SetReinforcementCount (2, -1) will set the 2nd team's reinforcement count to infinite.

RE: I fought The app and The app won

Posted: Fri Aug 11, 2006 7:42 pm
by Ace_Azzameen_5
Yeah, but the way and reason I have this set up this way is so that if you blow up enough droids, the unit count is significantly lowered, but they never run out.

It represents an infininite amount of security force droids stumbling upon the battle-and stops victory by conquest rules.

RE: The app won

Posted: Fri Aug 11, 2006 8:42 pm
by sawyerdk9
Was this in the updated Rise of Empire 1 map? Because I was trying to beat it and when it got down to like 3 for the enemy reinforcements, it stopped dropping, even though I was killing the enemy.

RE: The app won

Posted: Sat Aug 12, 2006 6:19 am
by Rekubot
Wow Ace~, that's actually pretty useful. Thanks!