SetAttractionActive - ObjectReference

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: ObjectReference Script

This function sets whether this ObjectReference should send attraction-object story manager events to actors with the specified attraction keyword.

Syntax[edit | edit source]

Function SetAttractionActive(Keyword apKeyword, bool abActive = true) native

Parameters[edit | edit source]

  • apKeyword: Attraction keyword (one that already exists on this reference) to enable or disable from sending story manager attraction-object events to actors with that keyword.
  • abActive : If true, allow this reference to send story manager attraction-object to actors with this keyword (note that this is allowed by default). If false, disable sending story manager attraction-object events to actors with this keyword.
    • Default: true

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Stop sending Attraction Object events to actors with the AO_RadioWaves keyword.
SecretSubmarine.SetAttractionActive(AO_RadioWaves, false)


; Resume sending Attraction Object events to actors with the AO_RadioWaves keyword
SecretSubmarine.SetAttractionActive(AO_RadioWaves)

Notes[edit | edit source]

This change will be saved and loaded in saved games, but will be cleared when the reference unloads.

See Also[edit | edit source]