I used to love making maps for SC1 and so I thought I would try to make a custom map in SC2. So I loaded up the map editor and within a few minutes I found out how much more complex the map editor is in SC2. I am having trouble with even the most basic triggers and I it is very hard to pick it up so I decided to seek out some help.
Here are my biggest problems, if anyone can help a noob out I would be greatful.
1. I need to bring a specific amount of a specific troop to a region and then have them removed.
2. I need to know how to edit the default victory conditions
3. I don't understand how to tie a event to a action. When I create triggers they are not tied to each other they all just go off at once in the start of the game. How do I tie a event to a action? So that when the event takes place the action goes off. Rather than a bunch of unrelated events and actions.
If I can learn how to do these 3 things I can at least start on the map I want to make. Thanks to anyone that takes the time to help me.
I'm a map noob also, im just messing around at the moment, designing terrain, I added a unit and I cant remove unless I hit undo, is there another way, I cant seem to select it with my cursor!
Okay, I don't know anything about mapping, BUT, I can point you in the right direction. Here you can probably find an answer to most of your questions, if you are okay with reading a bit.
1) I am not sure what you mean by "bring", but if you mean that you would like to tell them to move to the region and then remove them, than the best way would probably be to have two triggers, one with spawns them and issues orders:
3. To understand this, you need a good grasp on what all the components of a trigger is. "Events" are things that can happen that would cause a trigger to run. "Local Variables" I think is pretty self-explanatory. "Conditions" are things that it will check before running the actions, if these evaluate to false, it will not run any actions. "Actions" are the actual things that you want to happen when the trigger runs if the conditions are met. Lastly, one of the actions is "Run Trigger", which is the other way to get a trigger to run, even if the event has not happened (There is also an option for whether you should check the conditions or not on the "Run Trigger" action). So a final example of a full event driven trigger would look like:
Thanks for the help I was able to make a little progress but still i am not getting the desired results so I will tell you exactly what my problem is.
Event Unit Enters Location 1
My problem begins right here. My option is to select any unit on the map or have it set to any unit at all. However what I would like the trigger to do is to When exactly 2 Civilians are brought to Location 1 Have it remove only 2 Civilians from location 1 and Spawn 2 Marines at Location 2 for every 2 Civilians it removes from Location 1.
For Unit Enters/Leaves Region I cannot figure out how to specify a certain unit or the number of the unit.
When I try to set a variable or pick a unit it only lets me select ones on the map or have it set to any unit. When I set a variable for unit type the variable I set does not show up on the variable tab.
OK I almost got it , all I am missing is how I can remove the right amount of units
I don't understand why I cannot simply have it remove multiple units.
It has the option to remove a single triggering unit but not triggering units and not a specified number of units???
How do I make it remove the right number of units? It is very frustrating how complicated it is between having a single unit trigger vs multiple units. I have spent hours trying to figure this out.
Alright, I am not at home right now, or I would write some working code and post it. From the knowledge I have off the top of my head though, here is what you want:
Your Event should still be "Unit enters region".
Your Condition can be "If Unit Type of triggering unit == 'Civilian' ".
Your Action should be to loop through the units in the region. There should be some kind of "For each Unit in Region" action, and you can use that to determine if there is another unit in the region other than the triggering unit, and if that unit is a 'Civilian'. If it is, you should now have access to both units, and should be able to remove them, replace them, or do whatever you want :).
Hope this helps, if it doesn't I can try and write up a working example when I get home.
I used to love making maps for SC1 and so I thought I would try to make a custom map in SC2. So I loaded up the map editor and within a few minutes I found out how much more complex the map editor is in SC2. I am having trouble with even the most basic triggers and I it is very hard to pick it up so I decided to seek out some help.
Here are my biggest problems, if anyone can help a noob out I would be greatful.
1. I need to bring a specific amount of a specific troop to a region and then have them removed.
2. I need to know how to edit the default victory conditions
3. I don't understand how to tie a event to a action. When I create triggers they are not tied to each other they all just go off at once in the start of the game. How do I tie a event to a action? So that when the event takes place the action goes off. Rather than a bunch of unrelated events and actions.
If I can learn how to do these 3 things I can at least start on the map I want to make. Thanks to anyone that takes the time to help me.
I'm a map noob also, im just messing around at the moment, designing terrain, I added a unit and I cant remove unless I hit undo, is there another way, I cant seem to select it with my cursor!
@Slaaren: Go
tools -> Selection Mode or Space for the shorcut command
@ajilejay: Go
Okay, I don't know anything about mapping, BUT, I can point you in the right direction. Here you can probably find an answer to most of your questions, if you are okay with reading a bit.
Good luck!
@Zyst: Go
Thank you very much I will begin reading if anyone knows the answer to my questions and can save me some time, I would still appreciate the help.
Thanks alot, was driving me nuts lol
@ajilejay: Go
1) I am not sure what you mean by "bring", but if you mean that you would like to tell them to move to the region and then remove them, than the best way would probably be to have two triggers, one with spawns them and issues orders:
And then to have a trigger for when they reach the region
I added the noise just for effect :)
2. I don't know this off the top of my head, but what I have done in the map I am working on is to just end the game when my custom condition is met:
3. To understand this, you need a good grasp on what all the components of a trigger is. "Events" are things that can happen that would cause a trigger to run. "Local Variables" I think is pretty self-explanatory. "Conditions" are things that it will check before running the actions, if these evaluate to false, it will not run any actions. "Actions" are the actual things that you want to happen when the trigger runs if the conditions are met. Lastly, one of the actions is "Run Trigger", which is the other way to get a trigger to run, even if the event has not happened (There is also an option for whether you should check the conditions or not on the "Run Trigger" action). So a final example of a full event driven trigger would look like:
Hope it helps :)
@Honz: Go
Thanks for the help I was able to make a little progress but still i am not getting the desired results so I will tell you exactly what my problem is.
Event Unit Enters Location 1 My problem begins right here. My option is to select any unit on the map or have it set to any unit at all. However what I would like the trigger to do is to When exactly 2 Civilians are brought to Location 1 Have it remove only 2 Civilians from location 1 and Spawn 2 Marines at Location 2 for every 2 Civilians it removes from Location 1.
For Unit Enters/Leaves Region I cannot figure out how to specify a certain unit or the number of the unit. When I try to set a variable or pick a unit it only lets me select ones on the map or have it set to any unit. When I set a variable for unit type the variable I set does not show up on the variable tab.
How can I make it so it is set up like this
Player 1 has exactly 2 Civilians enter location 1
remove exactly 2 civilians from location 1
create 2 marines at location 2
@ajilejay: Go
OK I almost got it , all I am missing is how I can remove the right amount of units
I don't understand why I cannot simply have it remove multiple units. It has the option to remove a single triggering unit but not triggering units and not a specified number of units??? How do I make it remove the right number of units? It is very frustrating how complicated it is between having a single unit trigger vs multiple units. I have spent hours trying to figure this out.
@ajilejay: Go
Alright, I am not at home right now, or I would write some working code and post it. From the knowledge I have off the top of my head though, here is what you want:
Your Event should still be "Unit enters region".
Your Condition can be "If Unit Type of triggering unit == 'Civilian' ".
Your Action should be to loop through the units in the region. There should be some kind of "For each Unit in Region" action, and you can use that to determine if there is another unit in the region other than the triggering unit, and if that unit is a 'Civilian'. If it is, you should now have access to both units, and should be able to remove them, replace them, or do whatever you want :).
Hope this helps, if it doesn't I can try and write up a working example when I get home.