As Rheiko mentioned, you'll probably need to resort to triggers.
I've attached a sample map that might help you get started. There are two main aspects:
- Tracking how many units are loaded into a ship (you can use GUI Unit Event, but I just included a simpler version based off Uncle's version in this thread)
- Preventing movement of the ship when no units are loaded
For #1, you just need to detect the transport event, store a number for the ship, and then detect when a unit is unloaded and decrement that number.
For #2, I put a sample trigger that will detect if a unit is issued "move", "patrol", "attack", or "smart" and cancels that order if the ship has no units inside it.
The one thing to keep in mind is that the "load" order has very specific behavior--normally the boat will first move as far as it can and then the unit will move. That might be why the loading was messing up when you set the boat's movement speed to 0. Technically a player could abuse the ship restriction by doing a "load" towards a unit and then cancelling it. If you want to prevent that, I would probably doing something simple like checking the distance between the two units and allowing the order if they are close enough. You could do this by:
- Adding a condition "(Issue order) Equal to (Order(load))" in the "Or - Conditions" for "Prevent Boat Movement"
- Then before cancelling the order, you can do an If-Then-Else. If the issue order is equal to "load", then check the distance between the triggering unit and the target unit--and cancel the order if it is above some threshold (e.g. 300 units of distance).
Let me know if you have any questions!