News / Archive
    About Us
    Staff
    Staff Login
    Links
    Spotlight
    Interview


    SP Maps
    MP Maps


    SP Maps
    MP Maps
    Mods
    Prefabs
    Tools


    Basic Mapping
    Advanced Mapping
    Basic Coding
    Advanced Coding
    ConEdit
    Other


    Forums
    IRC
 

8/12 - Deus Ex 3 on the horizon
5/31 - Deus Ex Machinima!
10/23 - TNM Has Moved!
8/5 - New Version of 3ds2de + Tutorial!
6/28 - Chronos Lives!
8/5 - 3ds2de Version 2
5/16 - Der Zeitmann - Manual Installation (For Mac)
4/3 - DXMP_Cargoyard
4/3 - DXMP_Prophecy_Underground
12/24 - DXMP_Duality
Advanced Conversations Tutorial
By Jered
Date Created: 5/23/2002


Okay, this is where things get a little hairy. If you have not followed my first tutorial on basic conversations, GO DO IT NOW! It will be built upon in this tutorial. This is more of a specific situation tutorial. We will mainly deal with flags. Flags are things that can be set to True or False. If it is not specified they are automatically set to false. They are used frequently throughout many conversations. It is much akin to the 'If=1 then [action]' statement. For reference, a zero (0) represents false, and a one (1) represents True.

Lets open up ConEdit and create a new conversation. Select 'Mission16' and set the audio package to 'Mission16'. then click 'OK'. Add a conversation via 'Conversation -> Add Conversation'. Name the Conversation 'TalkCop'. For the owner type in 'Cop' and when prompted say yes. Go to the invoke tab and uncheck everything. Then go to invoke and uncheck 'PC bumps NPC'. Only 'PC frobs NPC' should be checked. Hit 'OK' Since we will use 2 actors (characters) in this tutorial, we will need to add another conversation. Click 'Conversation -> Add Conversation' But this time name it TalkToPaul and set the owner to 'PaulDenton'. Repeat the rest from above. Now we have two little heads in the far right and 1 thing under each of them. Lets start with PaulDenton. Click TalkToPaul. Click 'Event -> Add -> Check Flags'. This is where the flags come in. What we are going to do is have 2 characters in a room, Paul and a cop. If you talk to Paul, he says to get a weapon from the cop. After you talk to the cop he says something different. we will only need one flag for this conversation, which we shall name 'TalkedToCop'. We also have to use the jump command. This jumps to a certain point in the conversation skipping all that's in between.

Example

If TalkedToCop = 1 Then Jump to GotGun
Paul-go get a gun from the cop
JC-Okay
End
GotGun
JC-I got the gun
Paul-Good
End

It checks to see if the flag is true in the beginning. If it is, it jumps to the label 'GotGun'. If not it continues as normal. Okay. Lets start with Check Flags. From the window you opened, Click the button called 'Add Flag'. This brings up a separate box. Since we have no flags, we have to edit one in. Click 'Edit Flags' in this box to create a new flag. Type the name 'TalkedToCop' in the top box of the new window and click 'add' notice how it went to the bottom box. Now click 'Close'. This brings up the previous box. There is a pull down field in the lower left corner where you can select true or false. Since we want it check if this flag is true, select True. Then click the flag 'TalkedToCop' Twice. Then close the window and brings up the Add event window. This is where jumps come in. the box near the bottom says 'If true jump to' we want to set it to where it jumps to the event 'GotGun' sp type 'GotGun' in the window. Then Click Update. A box will appear in the far right box stating that:

Check Flags Jump To GotGun

TalkedToCop = True

This means that if 'TalkedToCop' is true it jumps to the label 'GotGun'. Lets create some text for when JC doesn't have his gun. Click 'Event -> Add -> Speech' The speaker is 'JCDenton' and he will be speaking to 'PaulDenton'. The text will be 'Hi'. click 'update'. Now we can save a little time. IN the bottom Left corner there is a box called 'Add Event'. Click It. See? It adds a new event -and- reverses the speaker and speakee for us! This will really be helpful for long winding conversations. Make sure 'PaulDenton' is speaking and 'JCDenton' is receiving. He will be saying 'Go get a gun from the cop and come back'. After this is done Click 'Update' Now click 'add event' once again. IN the second box from the top, pull down the bar and select 'End' and click 'update'. This is the End of this branch of the conversation. Now click 'close' and lets see what we've done. See how the first box is red? RED IS VERY BAD! The red signifies that the place its supposed to jump to, 'GotGun' doesn't exist. IF YOU RUN THIS IT WILL NOT WORK DON'T TRY! TO get rid of the red we have to create a event with the label of 'GotGun'. So add an event and this time in the 'Event Label' box type in 'GotGun'. Then click speech and set the speaker to 'JCDenton' and the person spoken to 'PaulDenton'. Then type the text 'I got my gun' in the text box and click 'update'. Now add another event, reverse the speakers if it doesn't do it automatically, and type in 'Good. Now don't kill yourself.'. Click 'Update' and add one final event which will just be the 'End'. The final right screen should read IN THIS ORDER:

Check Flags Jump to GotGun
TalkedToCop = True
--------------------------------------------------------------------------------
Speech JCDenton
Hi
--------------------------------------------------------------------------------
Speech PaulDenton
Go Get a gun from the cop and come back.
--------------------------------------------------------------------------------
End
--------------------------------------------------------------------------------
GotGun Speech JCDenton
I got my gun.
--------------------------------------------------------------------------------
Speech PaulDenton
Good. Now don't kill yourself.
--------------------------------------------------------------------------------
End

If it doesn't try it again. Now would be a good time to save. Go head and save right over your old tutorial file, as I will assume you did. Now its time for the flag to be changed to true and for you to learn how to receive weapons. Click 'TalkCop' in the left window and add a 'Check Flag' Event. Check to see if the 'TalkedToCop' Flag is true set the jump to 'GoAway'. No add some speech between the cop and JC. Speaker 'JCDenton, Speaker, 'Cop'. Text: Hi. 'Update'. 'Add Event' Speaker: 'Cop' Speakee: 'JCDenton' Text: 'I have a gun for you.' 'Update'. 'Add Event'. Here we learn another new skill. Transferring things between NPCs and the player. So click add event but this time select 'Transfer Object'. This brings up like 5 fields. The first is what you want transferred. We will use 'WeaponPistol'. It must be phrased like that so ExEd will know what we're talking about. This is the name of the object to be transferred. The next is the number of objects to be transferred. ONLY PUT ONE! More then one will cause the game to crash. That would be bad. If its a stackable object (grenades, medkits) you can select more then one at a time. The next field is 'Transfer to'. Put this to 'JCDenton', because he will receive the object. The next is 'transfer from'. Set this to 'Cop' because he's the one who will be giving the object to JC. The next is a bit confusing. Its 'On fail Jump to'. This is if the players inventory is full. Set this to 'NoRoom'. click 'update'. What will happen is that if the players inventory is full, it will jump to the label 'NoRoom' instead of giving him the gun. Click 'add event'. Add the event 'Set Flag'. Click 'Add Flag', double click 'TalkedToCop' and set to 'True', and hit okay. Then hit 'update'. This is saying that if The player successfully receives the gun, 'TalkedToCop' will be set to true. Add an 'end' event. This is the start of a conversation. Now we need a conversation if A. He already has a gun or B. He couldn't hold the first one. Remember that Check Flag we put in the beginning of the conversation that's now red? We need to give it a event Labeled 'GoAway' for it to Jump to. So add an event and Call it 'GoAway'. Make it so the 'Cop' says to 'JCDenton': GO AWAY!. then hit 'update' and add an 'end' event. Notice how the first red bock turned white? That's because the event for it to jump to is there. Now create a speech event labeled 'NoRoom'. Its 'JCDenton' talking to 'Cop' saying 'I'll Come Back Later'. Click 'update' and then add an 'end' event. Check it against this model. IT MUST BE IN THIS ORDER!

Check Flags Jump to GoAway
TalkedToCop = True
------------------------------------------------------------------------------------
Speech JCDenton
Hi.
------------------------------------------------------------------------------------
Speech Cop
I have a gun for you.
------------------------------------------------------------------------------------
Transfer Object JCDenton Transfer WeaponPistol from Cop to ....
------------------------------------------------------------------------------------
Set Flags
TalkedToCop = True
------------------------------------------------------------------------------------
End
------------------------------------------------------------------------------------
GoAway Speech Cop
GO AWAY!
------------------------------------------------------------------------------------
End
------------------------------------------------------------------------------------
NoRoom Speech JCDenton
I'll come back later.
------------------------------------------------------------------------------------
End

Save this over your old tutorial file. Now you'll need to re-compile mymap.u. UCC won't recompile something unless its missing so go into your c:\Deusex\system directory and delete it. If ExEd is running it won't let you so close it. No go to dos and run UCC in c:\DeusEx\System with the command 'UCC make'. Once that's done close dos and load up ExEd. Load up a working level (preferably the one you used before) and add a PaulDenton (Pawn -> ScriptedPawn -> HumanMilitary -> PaulDenton) and a cop (Pawn -> ScriptedPawn -> HumanMilitary -> Cop). Make sure your 'DeusExLevelInfo' is set to '16'. Load it up and TALK TO PAUL FIRST! He tells you to get a gun. Then talk to the Cop. he gives you the gun if your inventories not full. If you talk to him again he yells at you. Then go talk to Paul and he tells you not to kill yourself! That's it!

Notes: To redo your .u (to add to it) you will have to delete it form your system folder and re UCC make it. UCC will only update a file if its missing (Delete=Missing).

"Give us the Tools, and we will build worlds" ~ Jered



Copyright 2001 | Design by AsylumX | Coded by Jim