Triggers - Quests

Tutorial By Husky

BASIC QUESTS:
by husky_003


KEY:
BOLD = This stuff is important to the quest, remeber to do this.
Italics = Will be explained later.

At first thought you make think making quests triggers is very simple (well I did), but I was wrong.

In this tutorial I am going to lead you through on how to make a basic quest, this quest will be: Kill 10 Kobolds.

IMPORTANT: Firstly if your making an online (for multiple players playing at the same time) the way you ingage quest may be very different. In this tutorial i'm using a Single Player RPG syled quest, but if your makign a multiplayer i'd use a Text message to explain whats happening.

Ok to engage my quest i'm gonna make a very simple, short Cinematic. Personally I think this gives it more of a feel to the quest and makes yor RPG look less budget :P.

If you don't know how to make Cinematics either read Conans tutorial at the Tutorial Depository or at the Tutorial site.

TRIGGER 1:

For my case to ingage a quest your going to have to be close to the quest giver and you have to click him (select him).

So these are my Events & Conditions for this first trigger:
aKobold Quest Cinematic Events Player - Player 1 (Red) Selects a unit Conditions (Triggering unit) Equal to Captain 0009 <gen> ((Region centered at (Position of Captain 0009 <gen>) with size (400.00, 400.00)) contains Paladin 0018 <gen>) Equal to True

Just to clear that up a bit for you: Captain 0009 is the Quest giver, and Paladin 0018 is my hero. I think 400, 400 is a good size for most Unit given quests but you may want to increse it to 500 or maybe even 600.

Ok so now we move onto the Cinematic, these are the basic triggers to get a Cinematic started. REMEBER: Create a camera(s) first (if you want some sort of angle(s))!

aKobold Quest Cinematic Actions Cinematic - Turn cinematic mode On for (All players) Cinematic - Turn on letterbox mode (hide interface) for (All players): fade out over 2.00 seconds Camera - Apply aST Kill Kobold Quest Cam <gen> for (Triggering player) over 1.00 seconds Cinematic - Send transmission to (All players) from Captain 0009 <gen> named Town Guard Captian: Play No sound and display Hello there. As you.... Modify duration: Set to 8.50 seconds and Wait

So thats turning on the camera and get talking from my Captain (quest giver).

My final trigger looks like this:
aKobold Quest Cinematic Events Player - Player 1 (Red) Selects a unit Conditions (Triggering unit) Equal to Captain 0009 <gen> ((Region centered at (Position of Captain 0009 <gen>) with size (400.00, 400.00)) contains Paladin 0018 <gen>) Equal to True Actions Cinematic - Turn cinematic mode On for (All players) Cinematic - Turn on letterbox mode (hide interface) for (All players): fade out over 2.00 seconds Camera - Apply aST Kill Kobold Quest Cam <gen> for (Triggering player) over 1.00 seconds Cinematic - Send transmission to (All players) from Captain 0009 <gen> named Town Guard Captian: Play No sound and display Hello there. As you.... Modify duration: Set to 8.50 seconds and Wait Wait 1.00 seconds Cinematic - Send transmission to (All players) from No unit named QUEST REQUIREMENTS:: Play No sound and display Kill 10 Kobolds. .... Modify duration: Set to 3.00 seconds and Wait Wait 2.00 seconds Cinematic - Turn off letterbox mode (show interface) for (All players): fade in over 2.00 seconds Cinematic - Turn cinematic mode Off for (All players) Camera - Reset camera for (Triggering player) to standard game-view over 0.00 seconds Trigger - Turn on aKill Kobolds <gen> Wait 2.00 seconds Quest - Create a Optional quest titled Kobold Killers with the description The Town Guard Capt..., using icon path ReplaceableTextures\CommandButtons\BTNKobold.blp Quest - Display to (All players) the Quest Update message: NEW QUEST!: Kill 10 Kobolds to complete this quest. Set Kobold_Killed_Quest = (Last created quest)

REMEMBER: Create a new Quest Variable for the last action. And remeber to do the two triggers before them giving them an Icon and some basic Icon as to what you have to do.

TRIGGER 2:

Ok create a new trigger that is Initially Off. This next trigger is keeping your kill count and telling you when you have completed the limit. So for this your going to have to create a variable and make it an integer.

I labeled mine: Kobold_Killed.

So the for the Event, your going to have to use: A Unit Dies.

For my Condition I used "Or". This means it can be any type of Unit/Kobold you listed. In my case I have used: Kobold Tunneler and Kobold Geomancer.

And the action is the main part. From the main Action window use: Set Integer.

Now click down Variable and choose: Kobold_Killed from the Variable pull down menu. Now for the Value, click Value and select Kobold_Killed again, then press Ok. It should now say: (Kobold_Killed) + 1. We are done with this trigger press OK.

Now just to spice it up a bit were going to add another trigger that displays how many you have killed after every time you've killed one.

So create a new Action and goto Game - Text Message Explicitly Timed (I much prefer this over: Quest - Update Message since an update message satys on screen for about 10 seconds and you sometimes have 3 update messages on screen at one time, with quests like these).

I set the time displayed on screen to 3 seconds, this should be good for this type of quest. And for the message: Click down String One and then click down the next String One that appears and from the Function menu select: Conversion - Convert Integer to String.. Now click down the new Underlined blue text that has appeared and select Kobold_Killed.

Ok now goto String 2 inside String 1, and type: "/10". So this displays X/10 for the player, your now done with this part of the trigger. No go back to String to and in Value put " Kobolds Killed" (with a space before it).

So far it should look like:
aKill Kobolds Events Unit - A unit Dies Conditions Or - Any (Conditions) are true Conditions (Unit-type of (Triggering unit)) Equal to Kobold Tunneler (Unit-type of (Triggering unit)) Equal to Kobold Geomancer Actions Set Kobold_Killed = (Kobold_Killed + 1) Game - Display to (All players) for 3.00 seconds the text: (((String(Kobold_Killed)) + /10) + Kobolds Killed.)

Okay now we want to make a If/Then/Else Action.

I don't think I really need to explain anything for this part of the trigger so i'll just post up, what I think is good for it to look like:
If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Kobold_Killed Equal to 10 Then - Actions Sound - Play GoodJob <gen> Game - Display to (All players) the text: Return to the Capta... Trigger - Turn off (This trigger) Else - Actions Do Nothing

So it's just saying if you reach 10/10 it will display a little message, and i've added a sound in for good will.

Final look:
aKill Kobolds Events Unit - A unit Dies Conditions Or - Any (Conditions) are true Conditions (Unit-type of (Triggering unit)) Equal to Kobold Tunneler (Unit-type of (Triggering unit)) Equal to Kobold Geomancer Actions Set Kobold_Killed = (Kobold_Killed + 1) Game - Display to (All players) for 3.00 seconds the text: (((String(Kobold_Killed)) + /10) + Kobolds Killed.) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Kobold_Killed Equal to 10 Then - Actions Sound - Play GoodJob <gen> Game - Display to (All players) the text: Return to the Captain for your Reward. Else - Actions Trigger - Turn off (This trigger)


TRIGGER 3:

This trigger is the last one and is just an Ending Cinematic. This is also pretty self-explanatory so once again i'll just post up my Trigger:
aQuest Complete Events Unit - A unit comes within 200.00 of Captain 0009 <gen> Conditions Kobold_Killed Greater than or equal to 10 Actions Cinematic - Turn cinematic mode On for (All players) Cinematic - Turn on letterbox mode (hide interface) for (All players): fade out over 2.00 seconds Camera - Apply aST Kill Kobold Quest Cam <gen> for Player 1 (Red) over 1.00 seconds Cinematic - Send transmission to (All players) from Captain 0009 <gen> named Town Guard Captian: Play No sound and display You have actually k.... Modify duration: Set to 4.00 seconds and Wait Cinematic - Turn off letterbox mode (show interface) for (All players): fade in over 2.00 seconds Cinematic - Turn cinematic mode Off for (All players) Camera - Reset camera for (Player 1 Red) to standard game-view over 0.00 seconds Player - Add 10 to (Player 1 Red) Gold Quest - Mark (Kobold_Killed_Quest) as Completed Quest - Display to (All players) the Quest Update message: Quest Completed.

So thats your basic quest trigger. This should be enough to get you started on some more advanced quests for your RPG/Campaign.

Well that's all from me, I may add more different/more complex typed Quests later.

Here are some in-game screenshots just to give you a preview of what it should look like...

The Quest Log:
(Image)

The Quest Giver and the Hero:
(Image)

Three Triggers is all it needs:
(Image)

Hope this helped some of you,
-Husky

Click here to comment on this tutorial.
 
 
Blizzard Entertainment, Inc.
Silkroad Online Forums
Team Griffonrawl Trains Muay Thai and MMA fighters in Ohio.
Apex Steel Pipe - Buys and sells Steel Pipe.