Home   Help Search Login Register  

Author Topic: How to get a UnitMode  (Read 499 times)

0 Members and 1 Guest are viewing this topic.

shlomo

  • Guest
How to get a UnitMode
« on: 19 Feb 2004, 17:08:15 »
Hi All.

I have some debriefing tool that let you play a mission when it ends.
I collect lots of inforamtion during the game and then replay it.

What i still miss is the ability to set every unit to the same mode ("UP"/"DOWN") it was at each moment - using setUnitMode()

Does someone know hot to get this property ? ???

Komuna

  • Guest
Re:How to get a UnitMode
« Reply #1 on: 22 Feb 2004, 03:15:19 »
You can't. Excuse me, mate, for the bad news, but that's something BIS didn't think it would be necessary.

However [good news, heh?], I've been working in a very rude way of achieving it. Basically, I store the unit position mode (UP/DOWN) in an array of arrays*, given by a condition that comparises the unit speed with minimum values. Let's say that for speeds lower than 1kmph [value not checked] and higher than 0, the unit would be layed down. If stopped, then you wouldn't be able to check it, so, leave it as is.

Now, an important hint: don't define unit position with setUnitPos, as it would prevent the unit from laying down or standing up automatically. Instead, use the switchMove command to force an instantaneous lay [_unit switchMove "laydown"] or playMove for an animated laying.

*[[unit1,"UP"],[_unit2,"DOWN"],[~_unitN,~"MODE"]]

shlomo

  • Guest
Re:How to get a UnitMode
« Reply #2 on: 29 Feb 2004, 18:15:17 »
Thx Komuna

 :(