Objectives

From FleshWorks

Jump to: navigation, search

by David

Intro

This tutorial will deal with making objectives. Objectives are a combination of Conversations and Trigger Scripts. We'll start with something simple, like stealing a goblet. First we need to give your map a "Conversation Package" - this is the group of conversations the level can use. You can assign more than one package to a map.

Steps

Note: by Ziemanskye

In order to make the conversations actually save, you need to add these lines to your user.ini file:

[Conversations]
SchemaChangesAllowed=true
  1. From the View menu choose Level Properties. From there expand the bottom rung and choose LevelInfo > Conversation Package. If your mission is comprised of two maps called MyMap1.gmp and MyMap2.gmp then a good choice for a conversation package is MyMap.
  2. Now we need to create the objective conversation, so open the Conversation Browser (View > Conversations). Expand the PlayerGarrett node, right-click it and choose Add Conversation. Give the conversation a name - something simple like MyMapObjectives is good. Check the box Remain in First Person.
  3. Click the "Add Map" button and type the name you entered into the Conversation Package in #1 into the box at the top, and click Add Map. Select the new map and click Ok, it will now appear in the Usage listbox.
  4. Click the OK button and select your conversation which now appears under the PlayerGarrett section. In the right hand section right-click > Add > Goal.
  5. Enter a goal name, objStealGoblet would be good. Note this down as you will need it later.
  6. Ensure that Initial State is set to Pending and the other listbox is set to Objective.
  7. Enter some goal text, the player will see this when they start the mission. For now enter "Steal the goblet"
  8. Click Ok and then right-click Add > End to the same coversation.
  9. Click File > Save, File > Compile and File > Export Mission Objectives. If your objective shows up as only an empty tick box in the objectives list, try also File > Generate Schemas
  10. Close the Conversation Browser.
  11. Add a goblet of your choice to your map. These can be found in the Actor Class browser under WorldObj > InventoryObject > Loot.
  12. Open the goblet's properties and Scripts > TriggerScripts to the bottom rung. Expand the new node that appears and click "Add". Now click the "..." button. This will open the trigger script browser
  13. Create a new script and give it a name.
  14. Click the Condition button and choose Image:Condition_icon.png Frob > When I am frobbed by player.
  15. Click the Action button and choose Image:action_icon.png Goals > Set goal [String] to [Enum:eGoalState] and Click ok.
  16. Click [String] and enter the name of your objective, objStealGoblet.
  17. Now click [Enum:eGoalState] and change it to kGS_Success and click ok.
  18. Now we need to initialise the conversation when you start the map. Find the PlayerStart for your map and add a new trigger script.
  19. Choose the condition Image:Condition_icon.png Player > When player starts map, arriving from a different map.
  20. Choose the action Image:action_icon.png Conversations > Queue conversation [string] to play and click OK.
  21. Click [String] and enter the name of your objectives conversation, in this case MyMapObjectives.
  22. Click ok until you are back at the editor. Now save your map and give it a go, when you frob your goblet it should now do the standard "Objetive Complete" routine!


TTLG Forums Discussion Thread



Back to Mission Design: Gameplay Tutorials Page

Back to Mission Design Tutorials Page

Back to Main Tutorials Page

Personal tools