1. SPS Accounts:
    Do you find yourself coming back time after time? Do you appreciate the ongoing hard work to keep this community focused and successful in its mission? Please consider supporting us by upgrading to an SPS Account. Besides the warm and fuzzy feeling that comes from supporting a good cause, you'll also get a significant number of ever-expanding perks and benefits on the site and the forums. Click here to find out more.
    Dismiss Notice
Dismiss Notice
You are currently viewing Boards o' Magick as a guest, but you can register an account here. Registration is fast, easy and free. Once registered you will have access to search the forums, create and respond to threads, PM other members, upload screenshots and access many other features unavailable to guests.

BoM cultivates a friendly and welcoming atmosphere. We have been aiming for quality over quantity with our forums from their inception, and believe that this distinction is truly tangible and valued by our members. We'd love to have you join us today!

(If you have any problems with the registration process or your account login, please contact us. If you've forgotten your username or password, click here.)

Some introduction dialogue

Discussion in 'Neverwinter Nights (Classic)' started by Pyro, Dec 17, 2002.

  1. Pyro Gems: 5/31
    Latest gem: Andar


    Joined:
    Mar 8, 2002
    Messages:
    119
    Likes Received:
    0
    I need some help with some scripting. What i want to do is that when the player has created his character and is spawned into the gameworld, i want an invisible character "Introduction" to start speaking to him and i dont want the PC to be able to start moving untill this dialouge has been completed. How would i do this? I understand that i must put some script to initiate dialouge somewhere, but im not sure where or how this would look like, can anyone explain to me?

    [ December 18, 2002, 17:01: Message edited by: Taluntain ]
     
  2. Thorin Gems: 9/31
    Latest gem: Iol


    Joined:
    Jan 3, 2002
    Messages:
    303
    Likes Received:
    0
    Okay what you are asking about is called in game cinematics. The best resource for this is an forum discussion that talks about the new cinematic possibilites are now possible find it
    HERE

    If you get these scripts working you can tilt, pan and zoom the camera, plus be able to freeze the pc
     
  3. Pyro Gems: 5/31
    Latest gem: Andar


    Joined:
    Mar 8, 2002
    Messages:
    119
    Likes Received:
    0
    Nope, that posts only explain camera movement, and im not trying to do anything that advanced. The only thing i want to do is making an invisible NPC initiate dialogue and make the character unable to move during the dialogue.
     
  4. Thorin Gems: 9/31
    Latest gem: Iol


    Joined:
    Jan 3, 2002
    Messages:
    303
    Likes Received:
    0
    Okay what you need to know is that all the nwn scripting commands can be found at nwn lexicon

    the commands you should search for are:

    speakstring:(basic function to make something speak)
    SetCommandable: Decides if a pc can move or not

    also take a look HERE, and HERE

    [ December 17, 2002, 20:23: Message edited by: Thorin ]
     
  5. Pyro Gems: 5/31
    Latest gem: Andar


    Joined:
    Mar 8, 2002
    Messages:
    119
    Likes Received:
    0
    What im doing is putting an OnClientEnter script that first dissables the players ability to move and then initiates dialogue, this didnt work so now i use these scripts:

    OnClient enter(module properties):

    void main()
    {
    object oPC = GetFirstPC();
    DelayCommand(0.1,SetCommandable(FALSE,oPC));
    }

    And the OnSpawnScript for the dude thats going to speak:

    void main()
    {
    object oPC = GetFirstPC();
    object oIntro = GetObjectByTag("Introman");
    AssignCommand(oIntro,ActionMoveToObject(oPC,TRUE));
    DelayCommand(1.0,AssignCommand(oIntro, ActionStartConversation(oPC, "introtalk", TRUE)));
    }

    What this currently does is preventing the player from move like it should, but the dialouge does not start. Has anyone got any ideas as to why it wouldnt?
     
  6. Thorin Gems: 9/31
    Latest gem: Iol


    Joined:
    Jan 3, 2002
    Messages:
    303
    Likes Received:
    0
    You could always place a trigger on the ground, where the PC spawns. Then on the on-enter script place the npc dialouge script. If you do this remember to use the destoryobject command(i think that is what it is called) or everytime somebody runs over the trigger the script will fire.

    One other possibility is to place the command under the on perception of the npc. You will have to adjust the script though, so that it only fires once by setting the whole command into an
    if statement

    Example code
    int i_Intro_Talk = 0;
    if (i_Intro_Talk == 0){
    place the script here
    }
    i_Intro_Talk = 1;

    Some comments on the code above, first it was written of the top of my head, so it will most likely not compile, you will have to figure out the proper nwn syntax for it. Also because the variable is stored locally this if statement will only hold true until the person reloads the game, or exits and re-enters the area.

    So I recommed you use a trigger, as with the destoryobject command you can make sure that it only runs once.
     
Sorcerer's Place is a project run entirely by fans and for fans. Maintaining Sorcerer's Place and a stable environment for all our hosted sites requires a substantial amount of our time and funds on a regular basis, so please consider supporting us to keep the site up & running smoothly. Thank you!

Sorcerers.net is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on amazon.com, amazon.ca and amazon.co.uk. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.