SetOpen - ObjectReference: Difference between revisions

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Rasikko
m (→‎Notes: clarified note a little better.)
m (Convert source tags to syntaxhighlight)
 
Line 6: Line 6:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
Function SetOpen(bool abOpen = true) native
Function SetOpen(bool abOpen = true) native
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
Line 18: Line 18:


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Opens this door
; Opens this door
JailDoor.SetOpen()
JailDoor.SetOpen()
</source>
</syntaxhighlight>
<br/>
<br/>
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Closes this door
; Closes this door
JailDoor.SetOpen(false)
JailDoor.SetOpen(false)
</source>
</syntaxhighlight>


== Notes ==
== Notes ==

Latest revision as of 20:21, 5 September 2026

Member of: ObjectReference Script

Opens or closes this object.

Syntax[edit | edit source]

Function SetOpen(bool abOpen = true) native

Parameters[edit | edit source]

  • abOpen: Whether to open or close this object
    • Default: True

Return Value[edit | edit source]

None

Examples[edit | edit source]

; Opens this door
JailDoor.SetOpen()


; Closes this door
JailDoor.SetOpen(false)

Notes[edit | edit source]

  • When used to open a door, it will also remove any lock level that is placed on it.

See Also[edit | edit source]