• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

More than 10 units in a ship

Status
Not open for further replies.
Level 9
Joined
Jun 22, 2012
Messages
472
Hi everybody!

My question is simple (and could seem a bit stupid) : how can I put more than 10 units in a ship? In the editor the default setting is 10 units per ship, and it's impossible to increase this number. The solution probably lies on triggers, but I don't have the require skills to find the solution alone...

Thanks in advance.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Since Warcraft crashes if you try to create more than 10 slots (by holding SHIFT while selecting a value, you can bypass the limits), it has to be triggered.
The problem here will be the visuals: as far as I know you won't see any more than 10 units loaded into a transport at any time (at least not the standard cargo screen).

So before I'm going to give any further advice, I will need some information: do you want to be able to unload specific units, or is "unload all" good enough?
Also, are there a lot of floating texts in your map?

(Basically you just store the units for each transport and create a floating text above the transport to see how much more he can carry).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
There were more difficulties than expected, but I think that this is as good as I can get it.

While testing, I've found a few flaws though.
1) Even though you can carry a limitless amount of regular units, you can only carry 10 heroes maximum (9 if you're also carrying regular units).
2) When issuing a Load-command (you select a bunch of units and right-click the transport), only 10 (of maximum 12) units will be loaded into the transport (this is due to the hardcoded limit of 10 units per transport).
3) If you have 7, 9, or 11 units in the transport, 1 of those will be invisible in the screen (he will still exist and it's possible to get him out, it's only a visual error).
4) This does not use "Transport Size", you should always use '1' for this (I believe there is no function to detect the transport size of a unit. However, it is still possible to implement this if you would really need it).
5) Regular units will be unloaded instantly.
6) The system is quite heavy, though it probably won't really be noticeable.

I think that's it.
I did not add a cargo counter by the way, wasn't really sure whether that'd be worth it (I was thinking floating texts first, but the cargo's already have something above their head by default, it might look ugly).


If you've got any remarks or requests, leave a comment below.
 

Attachments

  • Custom Transport V2.w3x
    24.1 KB · Views: 92
Last edited:
Level 9
Joined
Jun 22, 2012
Messages
472
Yeah! Thanks a lot, it looks perfect!

However the problem is a little bit more complex on my map : most of my units are troops, that is to say that they move/attack following a leader and I can only select this leader (which is a kind of dummy unit I think). When I order the leader to go into the ship that doesn't work (even if this is a 10-unit troop), I'm obliged to load the units one after the other from the ship. And when I select the leader the text "Impossible to load this unit" apears. Could you have a quick look please? Otherwise it is not very important...

Edit : the "one after the other" loading doesn't work any more with your custom transport...
 

Attachments

  • (12)Seigneur des Anneaux test.w3x
    8.1 MB · Views: 114
  • (12)Seigneur des Anneaux with Custom Transport.w3x
    8.1 MB · Views: 97
Last edited:
Status
Not open for further replies.
Top