Difference between revisions of "StartConversation"
Jump to navigation
Jump to search
imported>Vswe m (Added Search Terms) |
imported>ZuTheSkunk (Can be used to make NPC talking with himself.) |
||
(One intermediate revision by one other user not shown) | |||
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 | |||
* This function can be used to force NPC into performing conversation with himself, if he's the TargetActor and TopicID is specified. | |||
==See Also== | ==See Also== |
Latest revision as of 07:23, 3 July 2010
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]