You know how in campagin, it says "get 5 canisters. (4/5 collected so far)".. Well thats really awesome. And your awesome to. Well maybe. You could be an evil murderer who enjoys sc2 custom maps when your not busy robbing banks and doing evil....If you ARE some evil criminal, go turn yourself in. For the rest of you...Read on. :D
Kill X units objective
1- Plunk down jim raynor for player 1 and 5 zerglings for hostile, and then fire up the trigger editor.
2- Add a new action to the default trigger. "create objective" is the name. Active, Primary Objective with text "Kill the zergz (0/5)" and description " whatever". I have no idea how players can even see the description but...put whatever you want in there.
3- Were gunna need some variables.
zerg_obj, type objective
zerg progress, type interger
4- K. Now go back to your trigger and add a "set variable" action. Set your objective variable to 'last created objective'.
5- New trigger, event should be 'unit dies'. Condition should 'unit type of unit(triggering unit)'...Check to see if its a zergling. You can also put in a similar condition to check if the killing unit was raynor if you want to. Or you can just check if the owner of the killing unit is player 1. But you should put 1 of these other in, otherwise any time a zergling dies it counts as you killing it.
6- New action. Modify variable 'zerg progress' +1. Add another action 'set objective text'. Set the objective to your objective variable. Set the text to combine text. Set the first text to "Kill the zergz (". Click on the second text and choose combine text again. Set the next bit of text to "convert integer to text" and set the integer to 'zerg progress'. Set the 3rd and final bit of text to "/5)".
7- Now add an if/then/else action. Set the condition to if 'zerg progress' = 5. Under 'then' add 'set objective state'. set the objective to your variable and the state to complete. Your all done!
Make a 'get to this area' objective
1- This ones even easier. Just like before, you need a variable to hold your objective. Make that now. Then create an objective saying "get to the door" and set the variable to last created objective, like before.
2- Make a new trigger, event 'unit enters region(your region here). You need to put a region wherever you want the goal area to be. For conditions, 'unit type of unit(triggering unit) == Raynor'. Add another condition for 'objective state'. Set the objective to your move objective you just made. Set the status to active. Create the same action as before- 'set objective status' and mark the objective as complete.
Let me know any other types of objectives you want to know about and I'll add them to this.
random fact for this tutorial- Did you know that It would take 11 Empire State Buildings, stacked one on top of the other, to measure the Gulf of Mexico at its deepest point? Betcha didnt.
You know how in campagin, it says "get 5 canisters. (4/5 collected so far)".. Well thats really awesome. And your awesome to. Well maybe. You could be an evil murderer who enjoys sc2 custom maps when your not busy robbing banks and doing evil....If you ARE some evil criminal, go turn yourself in. For the rest of you...Read on. :D
Kill X units objective
1- Plunk down jim raynor for player 1 and 5 zerglings for hostile, and then fire up the trigger editor.
2- Add a new action to the default trigger. "create objective" is the name. Active, Primary Objective with text "Kill the zergz (0/5)" and description " whatever". I have no idea how players can even see the description but...put whatever you want in there.
3- Were gunna need some variables.
4- K. Now go back to your trigger and add a "set variable" action. Set your objective variable to 'last created objective'.
5- New trigger, event should be 'unit dies'. Condition should 'unit type of unit(triggering unit)'...Check to see if its a zergling. You can also put in a similar condition to check if the killing unit was raynor if you want to. Or you can just check if the owner of the killing unit is player 1. But you should put 1 of these other in, otherwise any time a zergling dies it counts as you killing it.
6- New action. Modify variable 'zerg progress' +1. Add another action 'set objective text'. Set the objective to your objective variable. Set the text to combine text. Set the first text to "Kill the zergz (". Click on the second text and choose combine text again. Set the next bit of text to "convert integer to text" and set the integer to 'zerg progress'. Set the 3rd and final bit of text to "/5)".
7- Now add an if/then/else action. Set the condition to if 'zerg progress' = 5. Under 'then' add 'set objective state'. set the objective to your variable and the state to complete. Your all done!
Make a 'get to this area' objective
1- This ones even easier. Just like before, you need a variable to hold your objective. Make that now. Then create an objective saying "get to the door" and set the variable to last created objective, like before.
2- Make a new trigger, event 'unit enters region(your region here). You need to put a region wherever you want the goal area to be. For conditions, 'unit type of unit(triggering unit) == Raynor'. Add another condition for 'objective state'. Set the objective to your move objective you just made. Set the status to active. Create the same action as before- 'set objective status' and mark the objective as complete.
Let me know any other types of objectives you want to know about and I'll add them to this.
random fact for this tutorial- Did you know that It would take 11 Empire State Buildings, stacked one on top of the other, to measure the Gulf of Mexico at its deepest point? Betcha didnt.
Forgot to post here for space reserve.....Like always post comments, questions, whatever.