CXUnit::KillTime()

A new section for modding SOW Waterloo. Ask questions, post tips here.
Post Reply
Marching Thru Georgia
Reactions:
Posts: 1769
Joined: Mon Mar 29, 2010 9:56 pm

CXUnit::KillTime()

Post 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?
I can make this march and I will make Georgia howl.
mitra76
Reactions:
Posts: 933
Joined: Wed Mar 31, 2010 1:21 am

Re: CXUnit::KillTime()

Post 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
Visit my wargames blog: http://warforgame.blogspot.it/
Marching Thru Georgia
Reactions:
Posts: 1769
Joined: Mon Mar 29, 2010 9:56 pm

Re: CXUnit::KillTime()

Post 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.
I can make this march and I will make Georgia howl.
mitra76
Reactions:
Posts: 933
Joined: Wed Mar 31, 2010 1:21 am

Re: CXUnit::KillTime()

Post 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
Visit my wargames blog: http://warforgame.blogspot.it/
User avatar
RebBugler
Reactions:
Posts: 4252
Joined: Sun Aug 03, 2008 12:51 am
Location: Ouachita Mountains, Arkansas

Re: CXUnit::KillTime()

Post 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.
Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
mitra76
Reactions:
Posts: 933
Joined: Wed Mar 31, 2010 1:21 am

Re: CXUnit::KillTime()

Post 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
Visit my wargames blog: http://warforgame.blogspot.it/
Post Reply