Mod:Creation Kit/SayCustom - ObjectReference

Member of: Mod:Creation Kit/ObjectReference Script

Causes this reference to speak a topic as if it were the specified actor.

Syntax
Function SayCustom(Keyword akKeywordToSay, Actor akActorToSpeakAs = None, bool abSpeakInPlayersHead = false, \ ObjectReference akTarget = None) native

Parameters

 * akKeywordToSay: The keyword to use to locate a topic
 * akActorToSpeakAs: The actor this object reference should use to speak as (passed to topic conditions and used to select voices). If it is none, no actor will be used for conditions.
 * This parameter is ignored if this function is called on an actor. NOTE: this may require a cast to an actor. If you call SayCustom on an ObjectReference you know is an actor it will not know who you are talking about. It will compile, but if you have your dialogue conditioned on voicetype he will not say that line.
 * Default: None
 * abSpeakInPlayersHead: Should the voice come from within the player's head?
 * Default: False
 * akTarget: Target reference to say line to. Used for conditions.
 * Default: None

Return Value
None.

Examples
JoeBob.SayCustom(SomeKeyword) (JoeBob as actor).SayCustom(SomeKeyword)
 * Have the actor say a topic with that keyword
 * If JoeBob is a reference and not an actor, but you know that he is an actor:

Statue.SayCustom(SomeKeyword, TownGuard)
 * Have the statue speak a topic as if it were the town guard