get ISBEINGTRANSPORTED

get ISBEINGTRANSPORTED

Requests for features in the spring code.

Moderator: Moderators

Post Reply
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

get ISBEINGTRANSPORTED

Post by SpikedHelmet »

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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

/me slaps you.

All our arty scripts already do this using SetSFXOccupy, and have done for the past 4 years.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

In your bos:

Code: Select all

static-var isbeingtransported;


setSFXoccupy(terrain)
{
	isbeingtransported=(terrain==0);
}

Then wherever you can just do:

Code: Select all

if(isbeingtransported)
{
...
}
Or whatever.



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
Not sure Spring works 100% like that, but at least the 0 should.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

'blah blah sometimes i feel like noboby is even reading my posts blah blah'


:wink:
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

Who said that?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

FLOZi wrote:text
I am sorry what did you say?
Post Reply

Return to “Feature Requests”