Triggers - Quests

Husky

Local Lurker
Reaction score
120
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:
Code:
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))!

Code:
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:
Code:
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
        [I]Trigger - Turn on aKill Kobolds <gen>[/I]
        Wait 2.00 seconds
  [B]      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)
[/B]

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:
Code:
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:
Code:
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:
Code:
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:
Code:
aQuest Complete
    Events
        Unit - A unit comes within 200.00 of Captain 0009 <gen>
    Conditions
        [B]Kobold_Killed Greater than or equal to 10[/B]
    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
[B]        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[/B]
.

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:


The Quest Giver and the Hero:


Three Triggers is all it needs:


Hope this helped some of you,
-Husky
 

Attachments

  • Quest Tutorial.w3x
    50.7 KB · Views: 1,198

Rad

...
Reaction score
228
Just looked at some of the instructions then read the triggers, which were mostly the same thing I did (Except whats the difference between letterbox and cinematic mode?)
 
K

Killfest2

Guest
Rad said:
Except whats the difference between letterbox and cinematic mode?

Cinematic = Loss of control over units by "Human" player; engages cameras etc.
Letterbox = Simply the view, where black is put on either side, distinguising cinematics and allowing dialogue on the bottom.
 
S

Schwahl555

Guest
Problem i've encountered

Hey, this is a great help for me, but i ran into one problem. Right after i recieve the message that says "Return to _____ for your reward" the person im supposed to return to is simply gone. The unit just dissappears. However, i can still talk to him because i entered his region. Any ideas?
 

Battlemapsta

I am the Conduit of Change
Reaction score
101
Umm I did everything but the mark on his head is missing any help? The rest works fine. Good tutorial.
 

Husky

Local Lurker
Reaction score
120
Unfortunatly I made this Tut a while back, and I dont map anymore (well, I might be getting back into it actually). So, I apoligise for not being able to help yall with your problems.

Just try fiddling around and something might work :).
 
S

Slayer0109

Guest
yea

ok im lost on the conditions part... for the first part of it where u select the guy to activate video.. which conditions do i use for that? like unit comparison u know the specifics
 

Husky

Local Lurker
Reaction score
120
Slayer0109 said:
ok im lost on the conditions part... for the first part of it where u select the guy to activate video.. which conditions do i use for that? like unit comparison u know the specifics

Conditions for Cinematics are not Mandatory, but I used them.

What my condition is saying that if "I am within a certain range of the Town Captian it will intiate the Cinematic, and the quest".

Make sure you have The Frozen Throne, im not sure how much of this is possible without it.
 

magnemann

New Member
Reaction score
5
Is it possible to make this quest, but Just Ignoring the Cinematics? :D

Like I do every step, but Not the cinematics triggers Etc?
 

Husky

Local Lurker
Reaction score
120
magnemann said:
Is it possible to make this quest, but Just Ignoring the Cinematics? :D

Like I do every step, but Not the cinematics triggers Etc?

Sure is. Just make little chat event if you want. Whatever you prefer.
 

magnemann

New Member
Reaction score
5
Hmmm confusing, you say its 3 Triggers, but it shows several codes... Are they put together?

How Do I write Codes btw?
 

Husky

Local Lurker
Reaction score
120
magnemann said:
Hmmm confusing, you say its 3 Triggers, but it shows several codes... Are they put together?

How Do I write Codes btw?

Each trigger has an Event(s) Condition(s) and Action(s) in it. So those big blocks of text are actually just one trigger, just lots of Action/Conds/Events inside them.

Check out my other Tutorial "Husky's Guide to Trigger Basics" or whatever if you wanna learn more about them.
 

magnemann

New Member
Reaction score
5
husky_003 said:
Each trigger has an Event(s) Condition(s) and Action(s) in it. So those big blocks of text are actually just one trigger, just lots of Action/Conds/Events inside them.

Check out my other Tutorial "Husky's Guide to Trigger Basics" or whatever if you wanna learn more about them.


So, those 2 Codes (blocks) were just kinda step-by step, and the big large block at the end is How it should look in the end?
 
I

Itches

Guest
Hi, let me thank you on a truly wonderful turtorial!

I do have one question (one that rather sits as a thorn in my side)
i've looked over a trillion times in the events-unit area and i simply cannot find a way to have the event Unit- A unit dies...

I do not have the frozen throne exp. pack...might that be the problem?
 

jpres

New Member
Reaction score
15
Itches said:
Hi, let me thank you on a truly wonderful turtorial!

I do have one question (one that rather sits as a thorn in my side)
i've looked over a trillion times in the events-unit area and i simply cannot find a way to have the event Unit- A unit dies...

I do not have the frozen throne exp. pack...might that be the problem?
Yes, you need the Frozen Throne. If you have that, it is under Generic Unit Events.
 

Anything.

New Member
Reaction score
69
I like this tutorial, even though I didn't learn anything. It was fun to read, and pretty simple, and very concisely written... Good job!
 
R

Regicid3

Guest
i am new to the world editor and this maybe a really stupid question to ask but is this tut only for frozen throne, if so can someone send me a tut for RoC
 

Husky

Local Lurker
Reaction score
120
Regicid3 said:
i am new to the world editor and this maybe a really stupid question to ask but is this tut only for frozen throne, if so can someone send me a tut for RoC

You could do most of it in RoC, but im not 100% sure how to do some of it. Used TFT 95% of my mapping career...
 
I

Itches

Guest
I going to Fry's electronics tommorow and pray it has Tft...

But i have a question that was previouslely asked (i think) How do you add the (!) above the quest givers head?

Also...not sure if this is for only cause roc has it but it'd might be a good idea to have a few more trigger turn offs...(like turning off the first trigger when its been used) so u don't by accidently select the unit again and do the whole cinematic again (which adds the same quest again)

This is just a thought, once again....GREAT tut
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top