Welcome, Guest. Please login or register.
Dot Guests: 26
Dot Hidden: 0
Dot Users Online:
14 Choys Games Down? default_avatar

Replies LONEWOLFJE


1 How to make loading zones... Choy

Replies Choy


0 How to make loading zones... Insect

Replies Insect


0 Raytracing in unreal engi... FUBAR!!

Replies FUBAR!!


5 {YFW} Vincent Kane RIP Bigman

Replies Bigman


Author Topic: Postal 2: Dialog tutorial Part II  (Read 1734 times)

lostsharksoul

  • Holy SHIT!
  • Posts: 1056
  • Soulless
    • View Profile
Postal 2: Dialog tutorial Part II
« on: January 12, 2012, 05:58:40 AM »
Introduction:

This tutorial exaplains how to add a new dialog action.

Step by step. How to extract / compile scripts is explained here.

Goto Postal2Game folder and open three following files: P2Dialog, P2MoCapPawn, P2Pawn.

  • P2Dialog: scroll down a bit. You shall see many dialog variations. You may add your own line, it should just look this way:
    Quote
    var SLine lMaNewDialog;

    I recommend to add this to the top. You may save and close your file.
  • P2MoCapPawn: here it requires you to add a constant, scroll down until you find constants. For example you should add a line afterwards
    Quote
    const STAY_HERE            = 'StayHere';

    it should be the last anyway.
    Hell i don't know why does it require spaces, but i don't take any chances...
    Your line:
    Quote
    const MA_NEW_DIALOG         = 'MaNewDialog';

    next you better use search to find "MpPawn", nearer some of mp functions are given.
    You may add your own function:
    Quote
    simulated function DoMaNewDialog()
    {
       // STUB
    }
    function ServerMaNewDialog()
    {
       //NONE :P
    }


    ...originally that's an MP function so some animation is attached, but you're not gonna need it here.
    You may save and close your file.

Note: I actually seperated AnimAction and Dialog, it works well for me, but in case if it doesn't for you, you can add this:
Quote
      else if(AnimAction == MA_NEW_DIALOG)
      {
         DoMaNewDialog();
      }

to AnimAction Event. There's no animation will be played however.

  • P2Pawn: Nothing much at all. Add this:
    Quote
    function ServerMaNewDialog()
    {
    }

    Save,Close.

Now goto Multibase folder, open MpPawn.uc and add this code:
Quote
simulated function DoMaNewDialog()
{
   if(myDialog != None)
      Say(myDialog.lMaNewDialog);
}


Note: Check names properly, they have to match, otherwise you won't get this to work.

Congratulations! Now you have a command on your hands. Which starts with taunt. Simply it's being used in console by typing "taunt manewdialog"

The only thing left is What to say...

Goto BasePeople folder, open any dialog you wish to edit that your pawn uses, of course that's Dude by default, alright, open DudeDialog.uc, you may add as many lines as you wish, for example:
Quote
   Clear(lMaNewDialog);
   Addto(lMaNewDialog,                     "DudeDialog.dude_gunsdontkill", 2);
   Addto(lMaNewDialog,                     "DudeDialog.dude_mypresidentis", 1);


Save,Close. Now, goto System folder and remove three .U packages: BasePeople, Multibase, Postal2Game, you may now compile scripts.

Command is now can be used, however it is recommended to attach it to a key. Open User.ini file and find "Insert=", add "taunt manewdialog" to that. (For example; you can use any key you want)

You might find it silly, i find this very funny. Especially if animation is attached. 'I'm loving the applauding one. =))
And besides, very good for beginners just like me. :D

LORD MJ

  • Holy SHIT!
  • Posts: 1139
  • The LORD of all Lords
    • View Profile
    • http://lordmjproductions.weebly.com
Re: Postal 2: Dialog tutorial Part II
« Reply #1 on: January 12, 2012, 01:14:43 PM »
This is quite nice actually. Sometimes, when I do something funny I want to taunt but usually Dude remains silent.

Flawless job as always LSS.

When I get mad I just want to go POSTAL.

lostsharksoul

  • Holy SHIT!
  • Posts: 1056
  • Soulless
    • View Profile
Re: Postal 2: Dialog tutorial Part II
« Reply #2 on: January 12, 2012, 01:19:17 PM »
Depends where and what exactly. =)