A trigger to interject a conversation with a placeable requires two things.
1 - a placeable that is not set as STATIC within the trigger.
2 - a trigger to fire the conversation with the placeable.
void main()
{
object oPC = GetEnteringObject();
int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
if( GetIsPC( oPC ) )
{
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
AssignCommand (oPC, ClearAllActions());
DelayCommand(1.0, AssignCommand( oPC, ActionStartConversation( oPC, "NAME_OF_CONVO_HERE" ) ) );
}
}
Create your conversation and replace NAME_OF_CONVO_HERE in the script above with the name of the conversation file you saved it under.
Make sure the placeable you wish to speak with the PC entering the trigger has a UNIQUE TAG. I always like using an _ before the name of the TAG so it always appears at the top of the list within the conversation file itself.
Select your first conversation NODE.
Change the SPEAKER TAG using the DROPDOWN BOX to the TAG of the placeable.
So if you called it _PLACEABLE1, that's what you would use the dropdown box to select.
Give your placeable the appropriate portrait as well if you'd like.
That's it.
Now when the player enters the trigger, it will fire the conversation based on what you put in the script and use the placeable object as the speaker.
Putting the placeable too far away from the trigger will cause the conversation to fail.
FP!
Modifié par Fester Pot, 19 septembre 2010 - 04:26 .