David on 18/11/2004 at 20:02
This is a WIP tutorial and will not be completed until I am able to get the text for objectives to show. As this may (will?) require a new version of T3ed.exe and/or T3.exe some steps in it may change. (
http://www.ttlg.com/forums/showthread.php?t=94011) See this post by Alex Duran for more detailed info.
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.
#1 First we need to create the objective conversation, so open the Conversation Browser (View > Conversations). Expand the <em>PlayerGarrett</em> node, right-click it and choose <em>Add Conversation</em>
#2 Give the conversation a name - something simple like <em>MyObjectives</em> is good. Check the box <em>Remain in First Person</em>.
#3 Click the "Add Map" button and type the name of your map into the box at the top, and click <em>Add Map</em>.
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, <em>objStealGoblet</em> 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 ************ Saving/Compiling/Exporting may go in here ************
#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.
#13 Click the Condition button and choose <em>Frob > When I am frobbed by player.</em>
#14 Click the Action button and choose <em>Goals > Set goal [String] to [Enum:eGoalState]</em> and Click ok.#
#15 Click [String] and enter the name of your objective, <em>objStealGoblet</em>
#16 Now click [Enum:eGoalState] and change it to <em>kGS_Success</em> and click ok.
#17 Now we need to initialise the conversation when you start the map. Find the PlayerStart for your map and add a new trigger script.
#18 Choose the condition <em>Player > When player starts map, arriving from a different map</em>
#19 Choose the action <em>Conversations > Queue conversation [string] to play</em> and click OK.
#20 Click [String] and enter the name of your objectives conversation, in this case <em>MyObjectives</em>
#21 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!
Note: I wrote this tutorial based upon my sketchy notes from last week, I may have left out a step or two. Hopefully I'll be able to give it a go next week.