Page 2 of 2

Re: Transport "Load Flood"?

Posted: 14 Mar 2015, 11:08
by Forboding Angel
For the love of god, it really isn't that complicated to understand :-/

https://youtu.be/zrjx-JuglE0?t=20s

Re: Transport "Load Flood"?

Posted: 14 Mar 2015, 14:18
by Jools
I still don't know if you mean the loading or the unloading part, but to me both seem doable. Probably with AttachUnit function or something...

Re: Transport "Load Flood"?

Posted: 14 Mar 2015, 16:17
by PicassoCT
basically a drop in formation.. with a delayed drop for every unit.. mmh..

Re: Transport "Load Flood"?

Posted: 14 Mar 2015, 16:22
by FLOZi
Ok, judging by the video you want air transports specifically to instantly suck up units when ordered to load onto them, shouldn't be that hard.

Pseudocode:

Code: Select all

AllowCommand(..)
if cmdID == LOAD_ONTO then
  if ValidUnit(cmdParams[1]) then
    if GetUnitDefID(cmdParams[1]) == MY_SPECIAL_TRANS then
       CallScriptFunction(theFunctionThatCallsAttachUnitInLUS, unitID)

Re: Transport "Load Flood"?

Posted: 15 Mar 2015, 03:02
by Forboding Angel
PicassoCT wrote:basically a drop in formation.. with a delayed drop for every unit.. mmh..
No... -_- We already have drops covered. It's loading that is stupid atm.

Re: Transport "Load Flood"?

Posted: 29 Mar 2015, 12:02
by azaremoth
Any updates/gadgets here?

Re: Transport "Load Flood"?

Posted: 30 Mar 2015, 12:26
by Forboding Angel
Nope :-/

Re: Transport "Load Flood"?

Posted: 30 Mar 2015, 16:05
by FLOZi
FLOZi wrote:Ok, judging by the video you want air transports specifically to instantly suck up units when ordered to load onto them, shouldn't be that hard.

Pseudocode:

Code: Select all

AllowCommand(..)
if cmdID == LOAD_ONTO then
  if ValidUnit(cmdParams[1]) then
    if GetUnitDefID(cmdParams[1]) == MY_SPECIAL_TRANS then
       CallScriptFunction(theFunctionThatCallsAttachUnitInLUS, unitID)
What was wrong with this?

Re: Transport "Load Flood"?

Posted: 30 Mar 2015, 17:51
by smoth
My best guess is that has not even been tried.

Re: Transport "Load Flood"?

Posted: 16 Apr 2015, 23:37
by azaremoth
Forb - it is your birthday: 8)

https://github.com/azaremoth/cursed/blo ... ntload.lua

It might be a little messy for some parts, but it works as intended. If anybody comes up with an optimized version - please share. :-)

Re: Transport "Load Flood"?

Posted: 25 Apr 2015, 20:36
by azaremoth
I did some clean-ups and optimizations. Also shift queues should work now. Right now, the gadget is checking for the custom parameter "canbetransported" in the unitdefs. This is very cursed specific and should be replacable easily. :-)

https://youtu.be/UfHiGhSK2D4

Re: Transport "Load Flood"?

Posted: 26 Apr 2015, 03:18
by Forboding Angel
What is that unload method? Land flood unload is broken to shit in 96. Engine devs break land flood every other version. What you have is exactly what I want. I tried it but it looked like it needed a custom command which is nearly impossible to implement into integral menu.

Re: Transport "Load Flood"?

Posted: 26 Apr 2015, 13:57
by azaremoth
It is the flyover drop (transportUnloadMethod = 1). It works comparable to SC like transports.
Forboding Angel wrote:I tried it but it looked like it needed a custom command which is nearly impossible to implement into integral menu.
You may take a look at the custom release command for my bunker unit: https://github.com/azaremoth/cursed/blo ... elease.lua It is actually just a button that activates the unit script. However, integral menue does like it :-)

Re: Transport "Load Flood"?

Posted: 02 May 2015, 10:36
by Forboding Angel
When I give the transport the order to load the units, it just flies over to the area and sits there doing nothing.

Re: Transport "Load Flood"?

Posted: 02 May 2015, 10:47
by azaremoth
Care to give a little more information? In the cursed it is working well unless you order multiple transports to load the same units. Did you integrate the gadget to Evo? Did you add the custom parameter to the unit defs? …

Re: Transport "Load Flood"?

Posted: 02 May 2015, 18:44
by Forboding Angel
Do you have something special going on in the unit script or something?

You were right, I forgot to add the canbetransported = "true", customparam.

But now it wants to work but when the units should be getting hoovered, it throws this error:

Code: Select all

[f=0000704] Error: LuaRules::RunCallIn: error = 2, GameFrame, [string "LuaRules/Gadgets/unit_instantload.lua"]:158: attempt to index a nil value
stack traceback:
	[string "LuaRules/Gadgets/unit_instantload.lua"]:158: in function 'GameFrame'
	[string "LuaRules/Gadgets/hotfixes.lua"]:32: in function <[string "LuaRules/Gadgets/hotfixes.lua"]:29>
	(tail call): ?
If I'm reading this right it's basically having trouble getting the unitdefid of the transport. I looked over it but I don't know enough to be able to fix it. The reason I ask about unit script is because I'm wondering if it's looking for something else that I don't even know about.

Re: Transport "Load Flood"?

Posted: 03 May 2015, 02:07
by azaremoth
This is the part where the "TransportPickup" function in called in the unit script. Do you have something like that included in your transport unit's script:

Code: Select all

function script.TransportPickup ( passengerID )
	UnitScript.AttachUnit ( transportpoint, passengerID )
end
?

"transportpoint" has to be a unit piece.

Re: Transport "Load Flood"?

Posted: 03 May 2015, 03:03
by Forboding Angel
It requires a lua unit script?

That's probably something you should mention at the onset :?

My transport's script is in bos/cob and uses the ever common "link" piece.

Re: Transport "Load Flood"?

Posted: 03 May 2015, 13:28
by azaremoth
Forboding Angel wrote:That's probably something you should mention at the onset :?
Ehm... No. I consider lua-based unit scripts as the current standard. Cob/bos is the curiosity.

Anyway - if you change any lua script call to something like

Code: Select all

Spring.CallCOBScript( unitID, "CobTransportScriptPart", passengerID)
it should work also with bos/cob.

Re: Transport "Load Flood"?

Posted: 03 May 2015, 13:53
by FLOZi
N.B. script-loading units in this way can lead to incorrect setting of blocking states when unloaded (units can drive through each other)