Just would like some .cob code to see if a unit is currently being transported. Would be very useful for transports that do not hide the units they're carrying, ie, TA air transports and 1944's towed guns.
And only get, mind; no set.
get ISBEINGTRANSPORTED
Moderator: Moderators
-
- MC: Legacy & Spring 1944 Developer
- Posts: 1948
- Joined: 21 Sep 2004, 08:25
In your bos:
Then wherever you can just do:Or whatever.
For reference, in TA, the argument to setSFXoccupy were:
Code: Select all
static-var isbeingtransported;
setSFXoccupy(terrain)
{
isbeingtransported=(terrain==0);
}
Then wherever you can just do:
Code: Select all
if(isbeingtransported)
{
...
}
For reference, in TA, the argument to setSFXoccupy were:
- 0 -> Transported: Unit is being loaded
- 1 -> Sea: Unit does not have upright=1 and is going into sea. Or unit has upright=1 and is going into shore. (From unloading, or ground, or deep sea for upright unit)
- 2 -> Sea: Unit has upright=1 and goes into deep sea. (From shore, or unloading)
- 3 -> ????
- 4 -> Land: Unit is being created, goes from sea (or shore if upright=1) to dry ground