Difference between revisions of "SetRestrained - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>MoopusMaximus
 
(4 intermediate revisions by 3 users not shown)
Line 29: Line 29:


== Notes ==
== Notes ==
Restrained Actors can still be moved with functions that invoke movement, such as *KeepOffsetFromActor().
* Using SetRestrained on the player disables player movement, camera switching, and camera rotating, but keeps the full HUD displayed (unlike [[DisablePlayerControls - Game|Game.DisablePlayerControls()]]).
 
* Restrained Actors can still be moved with functions that invoke movement, such as KeepOffsetFromActor().
* Actors cannot be restrained and unconscious in the same time - flaging the actor as restrained unflags it as unconscious, and vice versa.


== See Also ==
== See Also ==
*[[Actor Script]]
*[[Actor Script]]
*[[SetUnconscious - Actor]]

Latest revision as of 19:54, 11 July 2023

Member of: Actor Script

Flags this actor as restrained or not. Restrained actors will not move from their current position, but will continue to "think" (pick packages, run detection so they could yell alarms) and go into dialogue.

Syntax[edit | edit source]

Function SetRestrained(bool abRestrained = true) native

Parameters[edit | edit source]

  • abRestrained: Whether to set or clear the actor's restrained status.
    • Default: True

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Set Prisoner to restrained
Prisoner.SetRestrained()


; Clear Prisoner's restrained status
Prisoner.SetRestrained(false)

Notes[edit | edit source]

  • Using SetRestrained on the player disables player movement, camera switching, and camera rotating, but keeps the full HUD displayed (unlike Game.DisablePlayerControls()).
  • Restrained Actors can still be moved with functions that invoke movement, such as KeepOffsetFromActor().
  • Actors cannot be restrained and unconscious in the same time - flaging the actor as restrained unflags it as unconscious, and vice versa.

See Also[edit | edit source]