• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Unsolved] So.. how would I make an enemy computer player make units to attack mine?

Status
Not open for further replies.
Level 2
Joined
Jan 21, 2015
Messages
14
Having trouble making a rescue mission via triggers, someone help?

So straight up, I am a noob to SC2 modding and mapping, yet I love the editor, I have literally not even finished HOTS yet because I am obsessed with the editor. I have made a map and would like to finish it, it is missing one thing though, the triggers, I have had no luck figuring out the triggers for what I want on my map, so I have turned to the pros to help me out, I have a simple question;

How would I make zerg kill squads spawn in bunches of maybe.. idk, like 11? units and head towards my point of choice and kill stuff on the way there? I am working on an Agria survival/slaughter map where you either save all the remaining colonists, or kill all the zerg on the map, which is a lot. So to keep the map spontaneous I want zerg kill squads to spawn and have like an unltralisk, some other big guys, and the rest as zerglings.

Also just to save me some time, how would I make the trigger for the event of all zerg dead = victory/all colonists saved = victory?

The above question about the victory/defeat triggers seem simple enough but I would still needa look them up, so might as well ask since I am here.

So all the above I have actually figured out through MAJOR trial and error, the zerg attack my troops and such, but I have one problem, I have an armored transport truck and I would like the win conditions and defeat conditions to be:

Defeat: Zeratul dies -> Done
Defeat: Transport truck is destroyed -> Done
------
Victory: Kill the zerg locust dreadnaught -> Done
Victory: Save at least 25 civilians -> NOT DONE

The reason I cannot figure it out is cause.. obviously I'm a noob, and that my civilians are consisted of:

Civilian males
Civilian females
Colonist males
Colonist females

And I cannot find a specific number counter condition, if I set it as absolute value (integer) wouldn't that make it so there HAS to be EXACTLY.. let's say.. 8 of the chosen unit?

In other words how could I make it so once the truck has them loaded as cargo and enters the region of choice for victory conditions, how could it check so that at least 25 civilians/colonists are alive and count them all together? Add them all in to a group and have it count that group? <-- BTW I have no clue how I'd do that either.


All above stuff is completed through toying around through the triggers and what info I have got to help from people.

I have one thing I am missing with it, the map technically ~could be~ finished right now, but it is missing something that could basically kill the point.. How do I make it so when the armored transport truck enters the evac region, it is required to have survivors in it? Like in the truck I mean, I have it currently so that if 25 civilians/colonists (in the Civilian Group) are alive and the truck enters the region without being destroyed (obviously), then it counts as victory, but the civilians DO NOT NEED TO BE IN IT TO WIN THIS WAY, how would I fix that? I wanna make it so you can't just ditch the civilians and take the truck to the region alone lol.. kinda kills the point of the map, yknow?

And I can probably figure this out after awhile more of messing with the triggers, but how would I make it so that for every civilian/colonist in the Civilian Group that enters the escape region, they disappear and the "Amount of Survivors to be Evacuated" count is reduced by the amount that disappeared when entering the region? Like in that mission from WoL on Agria where you have to evacuate the people (my map is on Agria as well) and the survivor count is reduced by however many people are in the trucks you are escorting?
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
How would I make zerg kill squads spawn in bunches of maybe.. idk, like 11? units and head towards my point of choice and kill stuff on the way there? I am working on an Agria survival/slaughter map where you either save all the remaining colonists, or kill all the zerg on the map, which is a lot. So to keep the map spontaneous I want zerg kill squads to spawn and have like an unltralisk, some other big guys, and the rest as zerglings.
You would need to program up the unit composition somewhere. It could be anything from a fixed table of several unit types and numbers all the way to randomly picking the composition from a table of possible composition components. How you do this is up to you.

When you create each unit type at the point of choosing you add it to a group. You then order the entire group to attack the point of your choosing. If you cannot find that order then chances are you are trying to modify a GUI component too deep (use the tree at the bottom to find all editable GUI components for an action).

If you want multiple kill waves to exist at a time and not mix together you might need multiple groups which you recycle as each wave dies.

Also just to save me some time, how would I make the trigger for the event of all zerg dead = victory/all colonists saved = victory?
Either periodically or in response to death you check if the Zerg has any living vulnerable, non-hidden units (it is important that they be vulnerable and not hidden for logical reasons). If the number in the group is less than or equal to 0 then the Zerg have been defeated and you win everyone. I would recommend doing this periodically every 20 seconds as you will be generating a large unit group, not something you would want to run every time a zergling dies when hundreds end up dying.

For the colonists being saved you keep track in a group the colonists not saved. When a colonist is saved you remove it from the group. Again you periodically check the number of units in the group if it is less than or equal to 0 and if so all colonists are saved then you win the players.
 
Level 2
Joined
Jan 21, 2015
Messages
14
Thanks for the reply, but how would I set a record for the colonists/civilians being saved or not? I have simply made it so that if a specific female civilian enters the region while in the truck, and there is ??????? colonists and civilians alive, then that is victory, very basic and needs to be changed so that all 25 of the humans need to be saved instead of just that female civilian, but first I need to figure out how to count how many I have saved, THEN change it so it isn't just that lady being saved and the rest counted.

Any help is beautifully needed and accepted.
 
Level 2
Joined
Jan 21, 2015
Messages
14
This thread is done, making a new one, staff please delete this.. or whatever you guys do to threads that are decided done but not answered. I will make a new thread with very specific questions, making a whole new map overall and scrapping this one.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
I have one thing I am missing with it, the map technically ~could be~ finished right now, but it is missing something that could basically kill the point.. How do I make it so when the armored transport truck enters the evac region, it is required to have survivors in it? Like in the truck I mean, I have it currently so that if 25 civilians/colonists (in the Civilian Group) are alive and the truck enters the region without being destroyed (obviously), then it counts as victory, but the civilians DO NOT NEED TO BE IN IT TO WIN THIS WAY, how would I fix that? I wanna make it so you can't just ditch the civilians and take the truck to the region alone lol.. kinda kills the point of the map, yknow?

And I can probably figure this out after awhile more of messing with the triggers, but how would I make it so that for every civilian/colonist in the Civilian Group that enters the escape region, they disappear and the "Amount of Survivors to be Evacuated" count is reduced by the amount that disappeared when entering the region? Like in that mission from WoL on Agria where you have to evacuate the people (my map is on Agria as well) and the survivor count is reduced by however many people are in the trucks you are escorting?
There are actions to get the units inside a transport.

You might want to bump your threads each time you want to update. Updates do not appear in your watched thread list in user control panel so people will not be aware of them where as new posts do.
 
Status
Not open for further replies.
Top