Hey, I have a quick question regarding an issue I'm facing.
Basically, I have a dropship and I want the player to be able to enter said dropship, but only if all his units are in a specific region.
Now, what is the easiest way I would go about doing that? I've tried several things, but all of the "Count Units in Region" conditions pretty much refer to a specific unit, or a specific number of units, but the thing is, I can't know how many units the player has at that point in the mission, so is there a way I can say something like "Make Sure all units are in this region" ?
I hope I explained it well and that someone knows a good way of doing this.
Rollback Post to RevisionRollBack
StarCraft II: Annihilation Campaign - A 24 mission single-player campaign featuring unique heroes, custom tracks, boss battles, a varied set of mission scenarios and three intersecting storylines.
Fill a group with all the units owned by a specific player within a certain region of count infinite (-1?). Make a new group which you then add all the units owned by the player to (add group to group). You then remove all the units in the region from this group (remove group from group). Finally you count the number of living units remaining in the group and if it is equal to 0 then all his units are in the region else one or more are not.
There are likely logically more efficient ways to perform this test. I specifically chose one which would make the most sense to a human (get all player units, remove the units in the region and then count the remainder, simple set stuff). Unless performance becomes an issue I would recommend sticking with what you can understand.
Thanks for your help on that. Things are working as intended now! :D
Rollback Post to RevisionRollBack
StarCraft II: Annihilation Campaign - A 24 mission single-player campaign featuring unique heroes, custom tracks, boss battles, a varied set of mission scenarios and three intersecting storylines.
Hey, I have a quick question regarding an issue I'm facing.
Basically, I have a dropship and I want the player to be able to enter said dropship, but only if all his units are in a specific region. Now, what is the easiest way I would go about doing that? I've tried several things, but all of the "Count Units in Region" conditions pretty much refer to a specific unit, or a specific number of units, but the thing is, I can't know how many units the player has at that point in the mission, so is there a way I can say something like "Make Sure all units are in this region" ?
I hope I explained it well and that someone knows a good way of doing this.
StarCraft II: Annihilation Campaign - A 24 mission single-player campaign featuring unique heroes, custom tracks, boss battles, a varied set of mission scenarios and three intersecting storylines.
Starcraft II: A War Story Campaign - A multi-act campaign with custom factions. Follow my discord for updates: https://discord.gg/Ztu44gZ
If you want to see a list of other awesome campaigns, go to: Custom Campaign Initiative
Fill a group with all the units owned by a specific player within a certain region of count infinite (-1?). Make a new group which you then add all the units owned by the player to (add group to group). You then remove all the units in the region from this group (remove group from group). Finally you count the number of living units remaining in the group and if it is equal to 0 then all his units are in the region else one or more are not.
There are likely logically more efficient ways to perform this test. I specifically chose one which would make the most sense to a human (get all player units, remove the units in the region and then count the remainder, simple set stuff). Unless performance becomes an issue I would recommend sticking with what you can understand.
@ImperialGood: Go
Thanks for your help on that. Things are working as intended now! :D
StarCraft II: Annihilation Campaign - A 24 mission single-player campaign featuring unique heroes, custom tracks, boss battles, a varied set of mission scenarios and three intersecting storylines.
Starcraft II: A War Story Campaign - A multi-act campaign with custom factions. Follow my discord for updates: https://discord.gg/Ztu44gZ
If you want to see a list of other awesome campaigns, go to: Custom Campaign Initiative