Author Topic: How do you edit a placable object's conversation and make it talk?  (Read 400 times)

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0


               I have this thing i want to talk, but nothing happens when I click on the edit conversation button. I switched it to commoner, but still no go.
               
               

               
            

Legacy_Morbane

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +0/-0
How do you edit a placable object's conversation and make it talk?
« Reply #1 on: July 29, 2011, 01:49:48 am »


               you have to script it and put the script in on used - the convo slot doesnt work that way it would seem to.
               
               

               
            

Legacy_Snarkblat

  • Full Member
  • ***
  • Posts: 104
  • Karma: +0/-0
How do you edit a placable object's conversation and make it talk?
« Reply #2 on: July 29, 2011, 05:21:12 am »


               //Put this script OnUsed
void main()
{

object oPC = GetLastUsedBy();

if (!GetIsPC(oPC)) return;

ActionStartConversation(oPC, "conversation_tag_goes_here");

}
               
               

               
            

Legacy_Melkior_King

  • Full Member
  • ***
  • Posts: 234
  • Karma: +0/-0
How do you edit a placable object's conversation and make it talk?
« Reply #3 on: July 29, 2011, 06:16:45 am »


               Pardon my butting in and I hope I understand the problem correctly, but wouldn't a simple:
void main()
{
BeginConversation("",GetLastUsedBy());
}
do the job (placed in the OnUsed event of the placeable)?

My understanding is that this would trigger the default conversation script for the placeable (in the Advanced tab of the Properties) with the default triggerer of the script (the PC) as the person to converse with.
[Edit] Looks like it doesn't automatically select the PC who triggered the event, so I added GetLastUsedBy() but it does automatically select the correct conversation file.

Of course, I could be wrong since I haven't tested this.

(Melkior wanders off to test his suggestion and find out if he's correct or, more likely, has made a total prat of himself)
[Edit] Melkior discovers that he was a bit of a prat and edits the script accordingly.
               
               

               


                     Modifié par Melkior_King, 29 juillet 2011 - 05:35 .
                     
                  


            

Legacy_Axe_Murderer

  • Full Member
  • ***
  • Posts: 199
  • Karma: +0/-0
How do you edit a placable object's conversation and make it talk?
« Reply #4 on: July 29, 2011, 06:20:38 am »


               BeginConversation is meant for use only in the OnConversation event.
               
               

               
            

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0
How do you edit a placable object's conversation and make it talk?
« Reply #5 on: July 29, 2011, 06:59:35 am »


               Snarkblat's code worked.
               
               

               
            

Legacy_Melkior_King

  • Full Member
  • ***
  • Posts: 234
  • Karma: +0/-0
How do you edit a placable object's conversation and make it talk?
« Reply #6 on: July 29, 2011, 07:17:49 am »


               Axe: That's probably why it didn't automatically select the player.

Groove: There's usually more than one way to do things and in this case I can't say that either one is "the right way".  I think my way is a bit easier since it automatically selects the conversation file but in the end, it comes down to what works for you.
               
               

               
            

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0
How do you edit a placable object's conversation and make it talk?
« Reply #7 on: July 29, 2011, 07:29:43 am »


               That's cool. This is my first NWN dungeon so i'm sort of just grasping at any way i can.
               
               

               
            

Legacy_Morbane

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +0/-0
How do you edit a placable object's conversation and make it talk?
« Reply #8 on: July 29, 2011, 07:30:22 am »


               Adding to what MK said - if you use the version with the empty convo tag - which I think will work for ActionStartConversation(oPC, "", FALSE, FALSE,TRUE,TRUE)
That should use the convo in the convo slot on the placeable or creature so that you can use the same script over and over <- untested directly but I believe that I have done it that way in the past.
               
               

               
            

Legacy_kalbaern

  • Hero Member
  • *****
  • Posts: 1531
  • Karma: +0/-0
How do you edit a placable object's conversation and make it talk?
« Reply #9 on: July 29, 2011, 02:23:38 pm »


               I use a generic script for all of my placeables. Set the following as as the script in a useable placeable's OnUsed Event:

void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
ActionStartConversation(oPC, "");
}


Then enter the actual conversation name in the conversation field under the advanced tab. Also, make sure that the faction is left as hostile under that same tab.
               
               

               
            

Legacy_Birdman076

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +0/-0
How do you edit a placable object's conversation and make it talk?
« Reply #10 on: July 31, 2011, 12:18:18 am »


               I use the bioware standard, why re-invent the wheel and use resources?


//::///////////////////////////////////////////////
//:: nw_g0_convplac
//::
//:: Copyright (c) 2002 Bioware Corp.
//:://////////////////////////////////////////////
/*
    Cause a placeable object to start a
    conversation with the PC.
    Use this script as the OnUsed event
    of a Placeable object that is flagged as
    Useable, Has NO Inventory, and is NOT Static.
*/
//:://////////////////////////////////////////////
//:: Created By: Sydney Tang
//:: Created On: Aug 08, 2002
//:://////////////////////////////////////////////
void main()
{
    ActionStartConversation(GetLastUsedBy());
}