And I finally thought of asking for help here at SC2Mapster. I don't really want to go through another night working on the same thing. D:
So I am trying to get a Hercules to spawn at a point, which I can get. I need it loaded with X amount of Units and for it to move to another point, drop off and turn the other way to leave.
This is what I have so far:
First of all: I don't know if the trigger works correctly, but just for the sake of cleanliness, you should probably replace the "Last Created Unit" sections of the "Create Cargo Units" actions with the Spawn Transport variable that you created.
Secondly, I would recommend getting the units inside the cargo hold as a unit group by using the "Cargo Units in Transport" Unit Group function.
Thirdly, if you want to order the transport to unload the units, then, well, just issue the order to unload the units using the "Issue Order" action.
I'd be glad to answer any further questions you have, and I hope this helps.
You're in luck, because I've done this exact thing on my map. What this trigger does is creates a Hercules, loads it with units, adds those units to a unit group, sends the Hercules to a point and drops off the units, and then sends the Hercules back to it's original position and then hides the Hercules.
Unit - Create 1 Hercules for player 1 at Red Hercules Entry Point using default facing (No Options)
Variable - Set Red Transport = (Last created unit)
Unit - Create 4 Marine as cargo in (Last created unit)
Unit Group - Add all units in (Last created cargo units) to Red Attack Wave
Unit - Create 4 Marauder as cargo in (Last created unit)
Unit Group - Add all units in (Last created cargo units) to Red Attack Wave
Unit - Create 4 Siege Tank (Tank Mode) as cargo in (Last created unit)
Unit Group - Add all units in (Last created cargo units) to Red Attack Wave
Unit - Order Red Transport to (Hercules - Unload All (Medivacs) targeting Red Hercules Landing Point) (Replace Existing Orders)
Unit - Order Red Transport to ( Move targeting Red Hercules Entry Point) (After Existing Orders)
General - Wait 8.0 Game Time seconds
General - Wait for (Conditions), checking every 1.0 Game Time seconds
Conditions
(Red Transport is in (Region(Red Hercules Entry Point, 5.0))) == true
One little comment: if you are not going to need that Hercules again, better Unit - Remove Red Transport from game at the end. Otherwise, if your map have this as a periodic event, you will end up having several dozens or even hundreds of hidden non-used units that takes up significant amount of memory after some time.
Thanks guys, that works a lot. If I may ask one more question; I can't seem to find a way to make the units that come out of the Hercules uncommandable. I'm trying to make the units kind of like Defense of the Ancients, where they spawn, are uncommandable and follow the path to attack. Keep in mind this map is not a DotA remake. T_T
And I finally thought of asking for help here at SC2Mapster. I don't really want to go through another night working on the same thing. D:
So I am trying to get a Hercules to spawn at a point, which I can get. I need it loaded with X amount of Units and for it to move to another point, drop off and turn the other way to leave.
This is what I have so far:
[IMG]http://i54.tinypic.com/2vxq4hw.png[/IMG]
I'm not sure what to do now. I'm kind of confused actually, very confused. If anyone could help that would be greattt!
First of all: I don't know if the trigger works correctly, but just for the sake of cleanliness, you should probably replace the "Last Created Unit" sections of the "Create Cargo Units" actions with the Spawn Transport variable that you created.
Secondly, I would recommend getting the units inside the cargo hold as a unit group by using the "Cargo Units in Transport" Unit Group function.
Thirdly, if you want to order the transport to unload the units, then, well, just issue the order to unload the units using the "Issue Order" action.
I'd be glad to answer any further questions you have, and I hope this helps.
-Vulfe
You're in luck, because I've done this exact thing on my map. What this trigger does is creates a Hercules, loads it with units, adds those units to a unit group, sends the Hercules to a point and drops off the units, and then sends the Hercules back to it's original position and then hides the Hercules.
Unit - Create 1 Hercules for player 1 at Red Hercules Entry Point using default facing (No Options)
Variable - Set Red Transport = (Last created unit)
Unit - Create 4 Marine as cargo in (Last created unit)
Unit Group - Add all units in (Last created cargo units) to Red Attack Wave
Unit - Create 4 Marauder as cargo in (Last created unit)
Unit Group - Add all units in (Last created cargo units) to Red Attack Wave
Unit - Create 4 Siege Tank (Tank Mode) as cargo in (Last created unit)
Unit Group - Add all units in (Last created cargo units) to Red Attack Wave
Unit - Order Red Transport to (Hercules - Unload All (Medivacs) targeting Red Hercules Landing Point) (Replace Existing Orders)
Unit - Order Red Transport to ( Move targeting Red Hercules Entry Point) (After Existing Orders)
General - Wait 8.0 Game Time seconds
General - Wait for (Conditions), checking every 1.0 Game Time seconds
Conditions
(Red Transport is in (Region(Red Hercules Entry Point, 5.0))) == true
Unit - Hide Red Transport
Man.. And I thought I was paranoid.
@Sephiex: Go
One little comment: if you are not going to need that Hercules again, better Unit - Remove Red Transport from game at the end. Otherwise, if your map have this as a periodic event, you will end up having several dozens or even hundreds of hidden non-used units that takes up significant amount of memory after some time.
@Sephiex: Go
Thanks guys, that works a lot. If I may ask one more question; I can't seem to find a way to make the units that come out of the Hercules uncommandable. I'm trying to make the units kind of like Defense of the Ancients, where they spawn, are uncommandable and follow the path to attack. Keep in mind this map is not a DotA remake. T_T
Use the Event Unit Loads/Unloads Cargo. Put some conditions if you want, and in Actions put a Make Triggering Unit Uncommandable.
@Wakeman: Go
No worries, it wasn't a periodic event on my map. So just one Hercules. Although for the original poster's purposes, that would indeed be necessary.
If I may, there's a simpler way to achieve this; once you have created the cargo units, just use this action (attachment).