StartConversation

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Syntax:

StartConversation TargetActor, TopicID 

Example:

StartConversation Joe, SecretTopic 
StartConversation player, ForceGreetTopic 

Use the function to force a conversation between two NPCs, starting with a specified topic. When you call this function on an actor, the actor will seek out the target actor in order to have a conversation, no matter where the two NPCs are currently.

You can also use it to have an NPC "force greet" the player, by setting the player as the TargetActor. The specified topic will be used instead of the normal Greeting topic, so you can have the NPC start the dialogue with any topic you like (use Greeting if you simply want the normal greeting).

Notes[edit | edit source]

  • The function may misfire if the NPC takes too long to reach the target, or if he/she engages in fallout behavior. It's better to keep calling the function until the NPC is actually speaking to the target. The following script could be used :
if ( rNPC.getCurrentAIPackage == 6 ) && ( rNPC.getPackageTarget == rTargetNPC )
    ; done
else
    rNPC.startConversation rTargetNPC
endIf
  • This function can be used to force NPC into performing conversation with himself, if he's the TargetActor and TopicID is specified.

See Also[edit | edit source]