Transport "Load Flood"? - Page 2

Transport "Load Flood"?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Transport "Load Flood"?

Post by Forboding Angel »

For the love of god, it really isn't that complicated to understand :-/

https://youtu.be/zrjx-JuglE0?t=20s
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Transport "Load Flood"?

Post 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...
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10455
Joined: 24 Jan 2006, 21:12

Re: Transport "Load Flood"?

Post by PicassoCT »

basically a drop in formation.. with a delayed drop for every unit.. mmh..
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6243
Joined: 29 Apr 2005, 01:14

Re: Transport "Load Flood"?

Post 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)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Transport "Load Flood"?

Post 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.
User avatar
azaremoth
Cursed Developer
Posts: 550
Joined: 17 Feb 2005, 22:05

Re: Transport "Load Flood"?

Post by azaremoth »

Any updates/gadgets here?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Transport "Load Flood"?

Post by Forboding Angel »

Nope :-/
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6243
Joined: 29 Apr 2005, 01:14

Re: Transport "Load Flood"?

Post 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?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Transport "Load Flood"?

Post by smoth »

My best guess is that has not even been tried.
User avatar
azaremoth
Cursed Developer
Posts: 550
Joined: 17 Feb 2005, 22:05

Re: Transport "Load Flood"?

Post 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. :-)
User avatar
azaremoth
Cursed Developer
Posts: 550
Joined: 17 Feb 2005, 22:05

Re: Transport "Load Flood"?

Post 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
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Transport "Load Flood"?

Post 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.
User avatar
azaremoth
Cursed Developer
Posts: 550
Joined: 17 Feb 2005, 22:05

Re: Transport "Load Flood"?

Post 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 :-)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Transport "Load Flood"?

Post 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.
User avatar
azaremoth
Cursed Developer
Posts: 550
Joined: 17 Feb 2005, 22:05

Re: Transport "Load Flood"?

Post 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? …
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Transport "Load Flood"?

Post 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.
User avatar
azaremoth
Cursed Developer
Posts: 550
Joined: 17 Feb 2005, 22:05

Re: Transport "Load Flood"?

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Transport "Load Flood"?

Post 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.
User avatar
azaremoth
Cursed Developer
Posts: 550
Joined: 17 Feb 2005, 22:05

Re: Transport "Load Flood"?

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

Re: Transport "Load Flood"?

Post 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)
Post Reply

Return to “Game Development”