I'm having trouble solving this little problem I have.
Basically I have a drop ship (or Hercules) dropping 6 Marines and 2 SCVs, the SCVs then builds 2 bunkers and the idea is for 3 Marines to enter one and the other 3 in the other bunker.
Because the bunkers aren't pre-placed I obviously can't select them within the trigger and the Last Created Unit command is no help because there's no way of telling if it's gonna be one of the Marines or SCVs not that I've tried it, I assume it won't work. Then I read somewhere on another forum something about order the Marine with "Smart Command" on the targetted region where the bunker is built, but that didn't work for me.
When the marines and SCVs have been spawned, I place 3 marines and 1 SCV into "Squad 1" Unit Group
and the other 3 marines and 1 SCV into "Squad 2" Unit Group.
Now that all fine and easy but when I add the Last Created unit for the bunker to "Bunker1" how would I know if it's going to be the bunker that the SCV builds?
There's so many possibilities, lets say it's a 6 player map with 4 human players with bases and each one decides to build a bunker at the same time as the SCV that I want is building a bunker?
Unless if I do something like remove control for all players and have the exact times for how long it takes for the SCVs to reach their destinations, but this is stupid. There must be another way to do this.
Here's probably your best option: use a trigger which fires when a bunker is finished construction. This trigger will command the closest 3 marines and SCV without orders to load up into the bunker.
Yes, if your bunker should be loaded instantly, you can probably just use last created unit or constructed unit or something and order it to load the marines. Also last created unit is local, so it will probably even work after a wait.
I don't think the Last Created Unit trigger works, thus anything that's been said here isn't helpful because it all requires the Last Created Unit trigger. Now I know how to use the Last Created Unit trigger as I've used it to add the Marines and SCVs to unit groups.
The reason why I think doesn't work for the Bunker is because the Bunker isn't actually being made in the trigger like the Marines and SCVs, the SCVs are building the Bunkers which means that they're being built on the map. If the Last Created Unit trigger is only local then it won't affect the Bunker because it's just like someone selecting an SCV and telling it to build a Bunker.
so your not able to have it as event-on ability stage complete(the building/constructing the bunker ability)
actions
set variable mybuildings[0](unitgroup) = last created unit(this being the bunker that was just created)
Thank you everyone for your help. Best of luck with your own maps and if anyone needs help (though I'm not really that good, but slowly I'm gettin better) feel free to ask :)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi,
I'm having trouble solving this little problem I have.
Basically I have a drop ship (or Hercules) dropping 6 Marines and 2 SCVs, the SCVs then builds 2 bunkers and the idea is for 3 Marines to enter one and the other 3 in the other bunker.
Because the bunkers aren't pre-placed I obviously can't select them within the trigger and the Last Created Unit command is no help because there's no way of telling if it's gonna be one of the Marines or SCVs not that I've tried it, I assume it won't work. Then I read somewhere on another forum something about order the Marine with "Smart Command" on the targetted region where the bunker is built, but that didn't work for me.
To help fix this problem, I have made a new map to isolate the triggers I'm having trouble with. www.user.i.net.au/mt/Reinforcements_Bunker.SC2Map
Thanks, Deathknight
Use variable to store last create units. Then it will work.
Are unit groups good enough?
When the marines and SCVs have been spawned, I place 3 marines and 1 SCV into "Squad 1" Unit Group and the other 3 marines and 1 SCV into "Squad 2" Unit Group.
Now that all fine and easy but when I add the Last Created unit for the bunker to "Bunker1" how would I know if it's going to be the bunker that the SCV builds? There's so many possibilities, lets say it's a 6 player map with 4 human players with bases and each one decides to build a bunker at the same time as the SCV that I want is building a bunker?
Unless if I do something like remove control for all players and have the exact times for how long it takes for the SCVs to reach their destinations, but this is stupid. There must be another way to do this.
@Deathknight01: Go
Here's probably your best option: use a trigger which fires when a bunker is finished construction. This trigger will command the closest 3 marines and SCV without orders to load up into the bunker.
@Khalanil1: Go
Can you do that without using a variable/unit group to store the bunker with the Last Created Unit trigger?
You can probably do this without triggers ;)
Yes, if your bunker should be loaded instantly, you can probably just use last created unit or constructed unit or something and order it to load the marines. Also last created unit is local, so it will probably even work after a wait.
Ok,
I don't think the Last Created Unit trigger works, thus anything that's been said here isn't helpful because it all requires the Last Created Unit trigger. Now I know how to use the Last Created Unit trigger as I've used it to add the Marines and SCVs to unit groups.
The reason why I think doesn't work for the Bunker is because the Bunker isn't actually being made in the trigger like the Marines and SCVs, the SCVs are building the Bunkers which means that they're being built on the map. If the Last Created Unit trigger is only local then it won't affect the Bunker because it's just like someone selecting an SCV and telling it to build a Bunker.
so your not able to have it as event-on ability stage complete(the building/constructing the bunker ability)
actions
set variable mybuildings[0](unitgroup) = last created unit(this being the bunker that was just created)
that not working for you?
@zeropoints: Go
No, that I don't know how to do that.
I've just done something else though which worked. I've made it so that:
Event:
Unit - Any Unit Enters Bunker 1 (Bunker 1 being the region where the Bunker is built)
Action:
General - Wait 42 Game Time seconds (with the assumption that it takes 40 Game Time seconds to build a Bunker)
Unit - Order (Triggering Unit) to (Bunker - Load (Bunker) targeting units in Squad1) (Replace Existing Orders)
Squad 1 being the 3 Marines and SCV I want loaded into the Bunker.
Yah! I got it working!
Thank you everyone for your help. Best of luck with your own maps and if anyone needs help (though I'm not really that good, but slowly I'm gettin better) feel free to ask :)