TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 2 of 2

Thread: Advanced Conversation Tutorial

  1. #1
    Jered
    Guest

    Advanced Conversation Tutorial

    ADVANCED CONVERSATIONS TUTORIAL
    BY: Jered
    Date: 9-23-00
    Caffiene Used: Surprislingly, None
    Legal Stuff: Read Bottom

    This Tutorials Scope is creating a conversation using flags and the 'transfer object' event ConEdit and ExEd (UnrealEd)

    THINGS NEEDED:
    The DeusEx SDK
    A map with people (Explained later)
    Patience
    NotePad
    Windows Explorer
    Completion of the first tutorial
    Paper would be handy, along with a pen

    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 automaticly 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 (charecters) in this tutorial, we will need to add another conversation. Click 'Conversation -> Add Conversation' But this time name it TalkToPaul andset 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 charecters 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 thats 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 begining. If it is, it jumps to the lable '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 seperate 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 feild 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. This cloes the window abd brings up the Add event window. This is where jumps come in. the bx near the bottom says 'If true jump to' we want to set it to where it jumps to the event 'GotGum' 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 ther is a box called 'Add Event'. CLick It. See? It adds a new ewvent -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 recieving. 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 secand 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 labal 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 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 automaticly, 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 recieve 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 to 'GoAway'. No add some speech between the cop and JC. Speaker 'JCDenton, Speakee, '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. Transefering 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 transfered. 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 onject to be transfered. 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 selecyt more then one at a time. The next field is 'Transfer to'. Put this to 'JCDenton', because he will recieve 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 succesfully recives 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 begining of the conversation thats 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. Notcie how the first red bock turned white? Thats because the event for it to jump to is there. Now create a speech event labled '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 thats done close dos and load up ExEd. Load up a working level (preferably the one you usefd 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! Thats it!

    Notes: To redo your .u (to add to it) oyu 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).
    If NAyone has a way to get importing mp3s tp work let me now.

    Webmasters: Feel free to post this tutorial anywhere you want just be sure i get and email and a link to where its posted please. Send it to matrixhunter2199@yahoo.com . Feel free to email me if you need help as well. And if you use this tutorial and build a level, please put my name somewhere. Thanks for all that you've done.

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

    ------------------
    Interior Designer
    Thievery UT

  2. #2
    Brother Murus
    Guest

    Thanks for another brillant tutorial. I got the last one to work (eventually) so I'll just go and try this one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •