Aller au contenu

Photo

How do you edit a placable object's conversation and make it talk?


  • Veuillez vous connecter pour répondre
10 réponses à ce sujet

#1
Groove Widdit

Groove Widdit
  • Members
  • 388 messages
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.

#2
Morbane

Morbane
  • Members
  • 1 883 messages
you have to script it and put the script in on used - the convo slot doesnt work that way it would seem to.

#3
Snarkblat

Snarkblat
  • Members
  • 52 messages
//Put this script OnUsed
void main()
{

object oPC = GetLastUsedBy();

if (!GetIsPC(oPC)) return;

ActionStartConversation(oPC, "conversation_tag_goes_here");

}

#4
Melkior_King

Melkior_King
  • Members
  • 135 messages
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 .


#5
Axe_Murderer

Axe_Murderer
  • Members
  • 279 messages
BeginConversation is meant for use only in the OnConversation event.

#6
Groove Widdit

Groove Widdit
  • Members
  • 388 messages
Snarkblat's code worked.

#7
Melkior_King

Melkior_King
  • Members
  • 135 messages
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.

#8
Groove Widdit

Groove Widdit
  • Members
  • 388 messages
That's cool. This is my first NWN dungeon so i'm sort of just grasping at any way i can.

#9
Morbane

Morbane
  • Members
  • 1 883 messages
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.

#10
kalbaern

kalbaern
  • Members
  • 824 messages
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.

#11
Birdman076

Birdman076
  • Members
  • 186 messages
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());
}