Page 1 of 1
CXUnit::KillTime()
Posted: Thu Jul 23, 2015 9:16 pm
by Marching Thru Georgia
Is CXUnit::KillTime(int val) a timer? If so, in what units are val? Finally, has this been tested in MP without any de-synchronization issues?
Re: CXUnit::KillTime()
Posted: Thu Jul 23, 2015 9:28 pm
by mitra76
it gives a int with the time of the last kill of one of unit men.
The result is a integer in game ticks; CXUtil::GetTime() gives the current time in ticks
Re: CXUnit::KillTime()
Posted: Thu Jul 23, 2015 9:38 pm
by Marching Thru Georgia
Have you ever tried to use a timer to delay an action in the game? I'd like to use a timer to force a unit to remain motionless while changing formation. Once the unit is in the new formation, it will begin to move.
Re: CXUnit::KillTime()
Posted: Thu Jul 23, 2015 10:00 pm
by mitra76
Timer is not good in this case because you cannot be sure when the formation is completed
You can halt and change formation from standing, but you have to copy the original destination .dst() before the halt and re-set it after the change formation order. In the next loop you have to check if the unit is still or not in march state which is the state of formation change, and at this point you can give again the Move order which should point to the .dst() value.
But is all largely theoretical because officer could have given in the meantime own orders and change the context and the values
Re: CXUnit::KillTime()
Posted: Fri Jul 24, 2015 9:10 pm
by RebBugler
Timer is not good in this case because you cannot be sure when the formation is completed
When changing formations the unit displays a second flag. This flag disappears upon formation completion. Could this be a means to MTG's end?
Having units only change formations while halted would slow down the game, but it definitely would eliminate many alignment 'worming' effects.
Re: CXUnit::KillTime()
Posted: Fri Jul 24, 2015 9:12 pm
by mitra76
When changing formations the unit displays a second flag. This flag disappears upon formation completion. Could this be a means to MTG's end?
Unluckily not, is a the same flag you have when the unit move; is the signal of March state condition