• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Shared Cargo Hold

Status
Not open for further replies.
Level 3
Joined
May 26, 2010
Messages
24
How does one go about making a shared cargo hold system in GUI triggers?
What do i mean by that? Well, you know that the ability used by transport units allows you to store up 6 units at a time, with the size editable. However what if i want the same 6 units to be available at another unit?
For an illustration, 6 units go into a tunnel entrance. They exit from another entrance.
It would behave like the nydus canal in starcraft.

Would that be possible to trigger?

One weird idea i have in mind would be to create an invisible flying unit that has cargo hold.
Each time you click an entrance, the flyer would pick up whatever unit that you loaded in an entrance.
That flyer would be triggered to move instantly to the clicked entrance, and ordered to unload the units in its cargo to that entrance. This would create an illusion that it is a tunnel system.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
When they smart the entrances you need to add them to a queue group. You then have a periodic trigger (eg every second) which manages the global cargo hold unit, teleporting it to the first found member of the queue group that is within load proximity of the entrance and ordering it to be loaded. The periodic trigger is disabled if there are no queued units to save processing resources. Each entrance/exit has an unload dummy ability which turns off the periodic trigger and this trigger, teleports the dummy to the casting unit, orders it to unload and then turns on the triggers as appropriate.

With fine tuning you might be able to get a load rate of 0.25 seconds per unit. Depends how responsive units are to load orders.
 
Level 3
Joined
May 26, 2010
Messages
24
Something like a delayed waygate, but more in the sense of units being held in a universal cargo hold.
I think i left out some details.
It would behave like a shared cargo across units with the ability.

So with this in mind, said cargo dummy unit would unload the picked up units from Building A into the cargo hold of Building B.
Whenever you select a building with the cargo hold ability, if you have units in the universal hold, you will always see the same units in the cargo hold of that building.

===============================================================

DrSuperGood, thanks for your reply!
I think i can apply it in what i am doing.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
So with this in mind, said cargo dummy unit would unload the picked up units from Building A into the cargo hold of Building B.
Whenever you select a building with the cargo hold ability, if you have units in the universal hold, you will always see the same units in the cargo hold of that building.
Would be ideal but not something I see working that well. What happens if multiple such buildings are selected at once? Can one instantly transfer units from 1 hold to another? You might have to make a compromise to get sort of the functionality you want without all the details being perfect.
 
Level 3
Joined
May 26, 2010
Messages
24
Would be ideal but not something I see working that well. What happens if multiple such buildings are selected at once? Can one instantly transfer units from 1 hold to another? You might have to make a compromise to get sort of the functionality you want without all the details being perfect.
Wow , that's something i didn't thought of. Yea you are right.
I think i will see how from here.

Thanks again.
 

Kyrbi0

Arena Moderator
Level 45
Joined
Jul 29, 2008
Messages
9,502
This is a fantastic question, since I've been wanting to do it myself for a long time. I've wanted to re-create Zerg Nydus Canals from Starcraft for years now, and Dwarven 'Tunnels' are an absolutely perfect way of doing it. The only thing stopping me was that I was unable to figure out how... I ended up incorporating a variant into my Jungle Troll race, code-named "Grand Central Station"-style teleporting (i.e. one big building that can garrison units & then instantly transport them, one-way, to target 'Farms'), since it was easier to figure out.

What you are describing sounds less like Nydus Canals (they always came in pairs of 2, and they were instantaneous; putting units in one end instantly popped them out the other), and more like GLA Tunnel Network from C&C Generals. There, you could construct any number of "Tunnel Network" buildings across the map, and garrison units inside of it. Those units could then be unloaded from any Tunnel Network building you had built, at any time.

I don't recall if C&C:G had 'multi-building selection', but I imagine they didn't so as to avoid that very issue (good point, DSG). I hadn't thought of it that way, but having an invisible "cargo" that just teleports between them makes sense.

I'd love to see this working.
 
Status
Not open for further replies.
Top