This guide is writen mainly 14.9.2010 while I'm was using editor version 1.0.3 (16291)
On this tutorial we are going to do working mission objectives that show up in upper left corner of screen.
Working objectives require working triggers that define victory, lose or other things so if you aren't familiar with triggers yet I recommend you to take a look at my other tutorial: http://forums.sc2mapster.com/resources/tutorials/9054-trigger-how-to-define-basic-victory-conditions/ In this tutorial I have explained step-by-step how to do triggers so I'm not going to write absolutely every step in this guide.
- - -
Ok. We are going to do a trigger that sets mission objective to "Destroy enemy Command Center." Before starting to do actual triggers make a map with some troops for player and preplaced Command Center for computer controlled enemy.
We want our objective to show up immediately when map starts so we are going to do a triggers which "Event" is "Map Initialization" and "Actions" (2) are "Objective - Create a Active Primary objective with text "Destroy enemy Command Center." and description "You have to destroy it." and "Data Table - Save (Last created objective) as "Objective1" in the Global data table.
That description part "You have to destroy it." shows up when you move cursor over it in game.
When you are doing that Data table trigger change green word "Value" to "Last created objective" in Function tab. Red "Name" to "Objective1" in "Value" tab. You have type that "Objective1" by yourself - you can't find it from any menus!
Now your trigger should look like in Picture "Objective1" in end of post.
Now we are going to do a trigger that changes status of mission objectives when that Command Center is destroyed.
In text form trigger's Event is "Unit - Command Center [11.50, 113.50] dies" (That 11.50, 113.50 might be anything else depending on coordinates) and "Actions" are "Objective - Mark ("Objective1" from the Global data table) as Completed."
You may want to change that "Completed" into "Hidden". Try both. Look at picture "Objective1 completed."
I hope this tutorial helps you begin with objective editing. Just try different variations with triggers. If you want to set up many objectives in beginning of the map look at picture "Many objectives" in end of post. Its very important that triggers are in right order so that "Objective" part is over "Data table" part because triggers higher happen before than triggers under it.
It is sad that you haven't gotten any sort of reply on this work, because it helped me with those "Save - Data table" stuff. :)
I have one question though. I want an objective to spawn when 3 Nydus Worms spawn. Ok, I have managed to do that.
But my problem is this: How can I remove the objective when the 3 Nydus Worms have been killed? I know how to do it if the unit already is on the map when the game starts, but since these Nyduses spawn in the game after a Spire has been killed, then I have no idea on how to do it.
I did not quite get what you meant there, because the Nyduses is spawning units, and those units won't spawn after the Nydus spawns, which again, the Nydus spawns when the Spire dies. How am I supposed to do this when all of the actions is after the game has started. I can't find the units anywhere because they aren't there yet.
Sorry if that was a messy post, but I'am confused as well :P
.. Ok, so I have still no clue after messing around with this like forever. Because I do not know how to add an trigger with something that has not happened yet, because it will happen in the game, and therefor the units is not on the list over units on the map :/
This is a bit of a cheap 'quick-fix' but I believe it should still work- if you know the type of unit triggered by the Spire's destruction and the amount, you could use an objective (as discussed by Terhonator) to handle the Nydus Worms. For example, if you have three Nydus Worms spawning, it'd be much easier to create an objective "Kill Three Nydus Worms" rather than attempt to specify targets. Hope this helps.
Tutorial on first post is quite old and it uses data table technique. I recommend to use "Objective" type variables instead.
Easiest way to make trigger like "Destroy X Nydus Worms." is to use variables. You can count amount of Nydus worms by "Set variable" trigger. "Combine text multiple" allows you to add variables into mission objective text.
Example of mission objective: Player needs to destroy 4 Missile Silos. I have set "Missile Silos" variable to "4". Each time Missile Silo is destroyed "Missile Silos" variable is reduced by 1 and objective text is updated like "Destroy all Missiles Silos. (3 left) Trigger "Check Missile Silos (Victory" checks every 2 seconds what is value of "Missile Silos" variable. If value is 0 player wins.
On picture "Set Variable" example I'm using "Set Variable" trigger to count amount of Infested Colonist Huts owned by players 4 and 5. (=Objective1) This way I can add or remove Infested Colonist Huts and mission objective counts everything right.
This guide is writen mainly 14.9.2010 while I'm was using editor version 1.0.3 (16291)
On this tutorial we are going to do working mission objectives that show up in upper left corner of screen.
Working objectives require working triggers that define victory, lose or other things so if you aren't familiar with triggers yet I recommend you to take a look at my other tutorial: http://forums.sc2mapster.com/resources/tutorials/9054-trigger-how-to-define-basic-victory-conditions/ In this tutorial I have explained step-by-step how to do triggers so I'm not going to write absolutely every step in this guide.
- - -
Ok. We are going to do a trigger that sets mission objective to "Destroy enemy Command Center." Before starting to do actual triggers make a map with some troops for player and preplaced Command Center for computer controlled enemy.
We want our objective to show up immediately when map starts so we are going to do a triggers which "Event" is "Map Initialization" and "Actions" (2) are "Objective - Create a Active Primary objective with text "Destroy enemy Command Center." and description "You have to destroy it." and "Data Table - Save (Last created objective) as "Objective1" in the Global data table.
That description part "You have to destroy it." shows up when you move cursor over it in game.
When you are doing that Data table trigger change green word "Value" to "Last created objective" in Function tab. Red "Name" to "Objective1" in "Value" tab. You have type that "Objective1" by yourself - you can't find it from any menus!
Now your trigger should look like in Picture "Objective1" in end of post.
Now we are going to do a trigger that changes status of mission objectives when that Command Center is destroyed.
In text form trigger's Event is "Unit - Command Center [11.50, 113.50] dies" (That 11.50, 113.50 might be anything else depending on coordinates) and "Actions" are "Objective - Mark ("Objective1" from the Global data table) as Completed."
You may want to change that "Completed" into "Hidden". Try both. Look at picture "Objective1 completed."
I hope this tutorial helps you begin with objective editing. Just try different variations with triggers. If you want to set up many objectives in beginning of the map look at picture "Many objectives" in end of post. Its very important that triggers are in right order so that "Objective" part is over "Data table" part because triggers higher happen before than triggers under it.
It is sad that you haven't gotten any sort of reply on this work, because it helped me with those "Save - Data table" stuff. :)
I have one question though. I want an objective to spawn when 3 Nydus Worms spawn. Ok, I have managed to do that. But my problem is this: How can I remove the objective when the 3 Nydus Worms have been killed? I know how to do it if the unit already is on the map when the game starts, but since these Nyduses spawn in the game after a Spire has been killed, then I have no idea on how to do it.
Help? :) Thanks.
@AdrianXtra: Go
EDIT: WOAH Whats with the boxes
@grenegg: Go
I did not quite get what you meant there, because the Nyduses is spawning units, and those units won't spawn after the Nydus spawns, which again, the Nydus spawns when the Spire dies. How am I supposed to do this when all of the actions is after the game has started. I can't find the units anywhere because they aren't there yet.
Sorry if that was a messy post, but I'am confused as well :P
.. Ok, so I have still no clue after messing around with this like forever. Because I do not know how to add an trigger with something that has not happened yet, because it will happen in the game, and therefor the units is not on the list over units on the map :/
If you understand.. Heh :)
@AdrianXtra
This is a bit of a cheap 'quick-fix' but I believe it should still work- if you know the type of unit triggered by the Spire's destruction and the amount, you could use an objective (as discussed by Terhonator) to handle the Nydus Worms. For example, if you have three Nydus Worms spawning, it'd be much easier to create an objective "Kill Three Nydus Worms" rather than attempt to specify targets. Hope this helps.
Tutorial on first post is quite old and it uses data table technique. I recommend to use "Objective" type variables instead.
Easiest way to make trigger like "Destroy X Nydus Worms." is to use variables. You can count amount of Nydus worms by "Set variable" trigger. "Combine text multiple" allows you to add variables into mission objective text.
Example of mission objective: Player needs to destroy 4 Missile Silos. I have set "Missile Silos" variable to "4". Each time Missile Silo is destroyed "Missile Silos" variable is reduced by 1 and objective text is updated like "Destroy all Missiles Silos. (3 left) Trigger "Check Missile Silos (Victory" checks every 2 seconds what is value of "Missile Silos" variable. If value is 0 player wins.
On picture "Set Variable" example I'm using "Set Variable" trigger to count amount of Infested Colonist Huts owned by players 4 and 5. (=Objective1) This way I can add or remove Infested Colonist Huts and mission objective counts everything right.
One more tutorial about making mission objectives: http://www.sc2mapster.com/forums/resources/tutorials/12560-trigger-how-to-link-variable-into-mission-objective/