GetBaseObject - ObjectReference: Difference between revisions

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Rhavlovick
m (1 revision: Clobber re-import by Henning)
 
m (Convert source tags to syntaxhighlight)
 
Line 6: Line 6:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
Form Function GetBaseObject() native
Form Function GetBaseObject() native
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
Line 17: Line 17:


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Obtains the base weapon for this reference
; Obtains the base weapon for this reference
Weapon sword = SwordOfDoomProperty.GetBaseObject() as Weapon
Weapon sword = SwordOfDoomProperty.GetBaseObject() as Weapon
</source>
</syntaxhighlight>


== Notes ==
== Notes ==

Latest revision as of 19:58, 5 September 2026

Member of: ObjectReference Script

Obtains the base object for this reference.

Syntax[edit | edit source]

Form Function GetBaseObject() native

Parameters[edit | edit source]

None.

Return Value[edit | edit source]

The base object for this reference.

Examples[edit | edit source]

; Obtains the base weapon for this reference
Weapon sword = SwordOfDoomProperty.GetBaseObject() as Weapon

Notes[edit | edit source]

If this function is called on a leveled Actor it will return the base object shown in the editor (the leveled actor base) and it will NOT return the temporary base object of the actor in the world. To obtain that base object, use GetLeveledActorBase on the actor instead.

See Also[edit | edit source]