Unload when being transported with ally's transport?

Unload when being transported with ally's transport?

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Unload when being transported with ally's transport?

Post by bobthedinosaur »

Would it be possible to create a widget (and or accompanying gadget if need be) that allows for players units that are being transported by an ally transport to be unloaded from the transport, so the player does not have to rely on the ally to use the unload command? Or is this currently not do able due to engine restrictions?
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Unload when being transported with ally's transport?

Post by SpliFF »

There are no related engine restrictions that a gadget couldn't override however it doesn't really make sense to implement. Unless your units are going to leap out of a moving plane it would require giving an order to an ally unit which in turn would give rise to annoying complications like:

* You force a transport to land or slow down when it is in danger, getting ally's transport destroyed.
* You set an unload point at a distance away from the transport, causing transport to move into danger.

Of course you could add a whole lot of complicated rules controlling when/how these orders take effect but at some point you've created a process more complicated, exploitable or troublesome than just telling your ally to please unload your units or give you the transport.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Unload when being transported with ally's transport?

Post by knorke »

to attach units to each other from gadget, magnetic BA does this:
Spring.UnitScript.CallAsUnit(unitID, Spring.UnitScript.AttachUnit,attachpiece, passengerID)
for dropping I guess this would work:
Spring.UnitScript.CallAsUnit(unitID, Spring.UnitScript.DropUnit , passengerID)
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Unload when being transported with ally's transport?

Post by bobthedinosaur »

it wont be for air transports, and maybe a speed check can be done before drop off.

But from what I understand you are saying it would be possible to drop off player specific unit just by using their passengerID's without dropping the whole rest of the loaded units off?

Interesting.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Unload when being transported with ally's transport?

Post by knorke »

drop off player specific unit just by using their passengerID's without dropping the whole rest of the loaded units off?
did not test but that is what I would expect from DropUnit, yup.
Post Reply

Return to “Lua Scripts”