Making Quests Part 2
In this tutorial I will expand the piece of work we made in Making Quests Part 1
We are going to make a Quest series, where there will be the following options:
x Accept the Quest via a menu text --> carry an object
x Decline the Quest via a menu text --> are you sure option via a menu text
x Really decline the Quest --> Restart the Quest later on
x Accepted the Quest --> Quest disappears, will not be given again.
x Deliver the Quest --> choose to get a reward via a menu text
x Deliver the Quest --> choose not to get a reward via a menu text
x Quest Deliverd --> Menu text will not be shown again
To make this all work we need to do alot of Kismet, and some UIscenes.
First thing you do is build your level.
LevelBuild
You need to make a level (1024x1024x512)
insert a small box where you want the picked-up item to be brought to (64x64x64)
Texture it all
Insert a player-start
Insert a lightpoint
Insert a DynamicTriggerVolume inside the small box (use the builderbrush, rightclick the AddVolume button in your menubar on the leftside of the screen and select Add DynamicTriggerVolume)
Insert a DynamicTriggerVolume somewhere in the area
Insert a StaticMesh as InterpActor on top of the last triggervolume
UIscenes
To make tis work, we need three UIscenes. One for accepting the quest, the second one in case you chose not to accept the quest in the first screen, and a third one for delivering the quest.
I named mine:
1) PickupQuest
2) PickupQuestRetry
3) DeliverQuest
Inside each of the three UIscenes i placed an Image label, with one label (black square with a white T inside) for the titel, and two for the selectable option. You can put as much text inside as you like, but I chose for a simple straight-forward way, as seen in Image 1
(hint: You can duplicate an UIscene, and then alter the text and Kismet inside)
The text in my UIscenes is as followes:
PickupQuest:
1) Yes give me the Quest
2) No I don't want the Quest
PickupQuestRetry
1) No I don't want the Quest
2) Oops, Ido want the Quest!
DeliverQuest
1) No I don't want a reward
2) Yes, give me a sniper rifle!
Inside each of the three UIscenes we need some Kismet. Right click in the blank area of your UIscene (make sure nothing is selected)
1) PickupQuest
Make the Kismet as shown in Image 2. The Kismet needs to be made in the ENABLED state (bottom right of your Kismet screen, UIscenes > PickupQuest > Enabled)
The EventName inside the ActivateLevelEvent i named YesGetQuest. It refers to some other Kismet later on. The CloseScene object-variables link to the UIscene you are in (pickupquest) The object variable underneath OpenScene refers to the UIscene PickupQuestRetry. This one opens up if you chose not to get the quest in the first scene
2) PickupQuestRetry
Make the Kismet as shown in Image 3. The Kismet needs to be made in the ENABLED state (bottom right of your Kismet screen, UIscenes > PickupQuestRetry > Enabled) The EventName inside the ActivateLevelEvent i named YesGetQuest. It refers to some other Kismet later on. The CloseScene object-variables link to the UIscene you are in(PickupQuestRetry)
3) DeliverQuest
Make the Kismet as shown in Image 4. The Kismet needs to be made in the ENABLED state (bottom right of your Kismet screen, UIscenes > DeliverQuest > Enabled) The EventName inside the ActivateLevelEvent i named GetSniperRifle. It refers to some other Kismet later on. The CloseScene object-variables link to the UIscene you are in(DeliverQuest)
Now it's time for some Kismet!
Kismet
Open up your Kismet window in your main editor screen (big green K in your top menubar)
We need 4 Kismet combinations.
1) This one opens up the PickupQuest UIscene (Image 5)
2) This one drops the object when you are at the right location, and opens up the DeliverQuest UIscene (Image 6)
3) This one delivers you the sniper rifle (Image 7)
4) This one lets you pick up the object, and makes the triggervolums dissapear when they are used. (Image 8)
1) The first one we need is to openup the PickupQuest UIscene. Make sure the DynamigTriggerVolume at the pickup object in your main editor window is selected, and right-click in your Kismet and select New Event using DynamigTriggerVolume_x > Touch
Inser an OpenScene object, asign the variable " PickupQuest" to it.
First one is done, as seen in image 5.
2) This one drops the object, when you are at the drop location, and opens up the DeliverQuest UIscene.
Make sure the DynamigTriggerVolume at the delivery point in your main editor window is selected, and right-click in your Kismet and select New Event using DynamigTriggerVolume_x > Touch Insert an AttachToActor object, asign a variable Player (New Variable > Object > Player) and a new variable to " Attachement" . Select your InterpActor in your main editor window, right-click the newly created variable, and select " Apply InterpActor to Variable.
Create an OpenScene object, and asign a variable to it, which links to the DeliverQuest UIscene.
Second one is done as seen in image 6
3) This one gives you a sniper rifle and infinite ammo to go with it.
Insert a remote event, name it GetSniperRifle, a New Action > Pawn > GiveInventory and Pawn > InfiniteAmmo
Assign a Playervariable to it (New Varaiable > Objec > Player)
In the GiveInventory object, insert a sniper rifle under the InventoryList tab
Third one is done as seen in image 7
4) This one is a bit more complex. It let's you pickup the object, and moves the trigger volumes.
Insert a remote event Name it YesGetQuest. Insert an AttachToActor object, creae a player variable, and link Attachment to your InterpActor.
Insert two matinee's, and one delay. Set your delay to 30 seconds. This way you have 30 seconds to place your object, or you'll be running it around forever!!
In your main editor window select the TriggerVolume at the pickuppoint. Double-click one of the Matinee objects. A Matinee screen opens up. In the left bottom right-click and insert a new folder. Next, insert a new MovementTrack.Place two Keys (most-left button on your top menubar inside Matinee, firsdt on 1 sec, second on 2sec. With the second key selected, move your TriggerVolume out of your playable area inside your main editor window. A yellow line should appear (see Image 9)
Close your Matinee
Do the same for the other TriggerVolume (at deliverpoint) with the other Matinee.
Link this last matinee with the delay object as seen in Image 8
Last one is done as seen in Image 8
You can also work without Matinee. By simply adding a toggle object (Action > Toggle > Toggle) and connect it with your Triggervolume to turn it either on or of. (you can select the bEnabled option inside the properties of the Triggervolume to make it usable or not usabela at gamestart)
Play around now, everything should work out fine now!





