- Joined
- Dec 24, 2010
- Messages
- 18
Hey guys. Im making a quest map and i cant make a trigger where you get rid of a small group of 20 orcs. Any suggestions on how to make that trigger?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Make

Events


Map initialization

Conditions

Actions


-------- Firstly, we're going to add a quest --------


-------- -------------------- --------


Quest - Create a Required quest titled Orcs Hunter with the description Kill 20 orcs, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp


Set Quest[1] = Last Created Quest


-------- -------------------- --------


-------- Why do we set it into a quest-type variable? Because we want to transfer them to other triggers. --------


-------- Variables can be used to store a data. --------


-------- Variables are also useful in transferring data to other triggers. --------
Objective

Events


Unit - A unit Dies

Conditions


(Unit-type of (Triggering unit)) Equal to Grunt

Actions


-------- -------------------- --------


-------- Actions: A unit dies. <- It simply means that this trigger will be executed when a unit dies. --------


-------- Conditons: Unit type of (Triggering Unit) equal to Grunt. <- This means if the dead unit is a grunt, then the trigger will be executed. --------


-------- -------------------- --------


-------- If the quest is meant to be single player, then make the integer-type variable has no array, like below. --------


Set QuestKillOrcCount = QuestKillOrcCount + 1


-------- -------------------- --------


-------- If the quest is meant to be multiplayer, then make the integer-type variable has array, like below. --------


Set QuestKillOrcCount[Player number of (Owner of (Killing Unit)) = QuestKillOrcCount[Player number of (Owner of (Killing Unit))] + 1


-------- -------------------- --------


-------- ^ Please choose only one of them --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




-------- If it is meant for single player, the conditions should be like below: --------




QuestKillOrcCount Equal to 20




-------- If it is meant for multiplayer, the conditions should be like below: --------




QuestKillOrcCount[Player number of (Owner of (Killing Unit))] Equal to 20



Then - Actions




Quest - Mark (Last created quest) as Completed




-------- -------------------- --------




-------- You might want to display that quest is complete --------




-------- So we'll display a message, like the example below --------




Game - Display to (Player group((Owner of (Killing unit)))) the text: Quest complete



Else - Actions


-------- -------------------- --------


-------- We don't want it to be excuted further anymore. But if this is meant to be multiplayer quest, then don't do the action below. --------


Trigger - Turn off (This trigger)


-------- -------------------- --------


-------- Q: What is QuestKillOrcCount? --------


-------- A: It is a integer-type variable. It's role in this trigger is to count the number of orcs you killed. So, QuestKillOrcCount + 1 means, the number of orcs you killed + 1. Simple enough? --------

Im gonna go with no...