This is a feature that is requested frequently. Search for transport unit or garrison.
There's a lot that can be done with this but this will only be the basics.
This is the plan so far:
1. The player will select the units they want to transport and right click on the container unit.
2. The selected units will move towards the container unit.
3. When the selected units are in range they will disappear from view and be disabled. They are added to the list of units that the container unit is carrying which will be visible in the display panel (like the selection portraits). The container unit will have a max amount of units that it is able to carry (regardless of size).
4. The container unit will be able to move around as normal. If it dies all the units it holds will also die.
5. The container unit will need a deploy skill which will reposition all the units it holds and make them visible and enabled (possibly one unit at a time). The transport unit should be stopped when the deploy skill is used.
I haven't made a ticket for this yet.
@Silnarm: You said you had an idea at
https://forum.megaglest.org/index.php?topic=4469.msg27525#msg27525 but didn't share it.
Edit: Added more to the algorithm.
Edit:
Here are some ideas that people have suggested or mentioned which could be discussed when the basic functionality is finished:
- units inside a transport/building be able to shoot (Wyvern)
- everything should sink and die when the carrier dies, but when on ground, an apc, for example, the units should survive with lowered health (Wyvern, Omega)
- some have a combination of units and transport moving where they try to meet in the middle (John.d.h)
- control how fast the deploy speed is, not all at the same time (Gabbe, ChupaReaper)
- adjust the movement speed based on how many units are carried (ChupaReaper)
- set which units are able to be carried (Omega)
- flag to prevent nested transports (ChupaReaper)
- visible carried units, such as a horse mount [maybe have positions with usable guns, ie attach to symbiotic pets] (ChupaReaper)
- allow units to modify the carrier's stats when carried (like an inventory system in other RTS games)