Difference between revisions of "StartConversation"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Vswe
m (Added Search Terms)
imported>Shademe
(→‎Article Updated:  Added Notes : Function misfire workaround)
Line 8: Line 8:


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).   
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==
* 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


==See Also==
==See Also==

Revision as of 19:42, 28 May 2009

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

  • 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

See Also