SayCustom - ObjectReference

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: ObjectReference Script

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

Syntax[edit | edit source]

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

Parameters[edit | edit source]

  • 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[edit | edit source]

None.

Examples[edit | edit source]

; Have the actor say a topic with that keyword
JoeBob.SayCustom(SomeKeyword)


; If JoeBob is a reference and not an actor, but you know that he is an actor:
(JoeBob as actor).SayCustom(SomeKeyword)


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

See Also[edit | edit source]