Difference between revisions of "OnSit - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
(Created page with 'Category:Scripting Category:Papyrus Category:Events '''Member of:''' Actor Script Event called when this actor sits on a piece of furniture. == Syntax == <sourc…')
 
imported>Terra Nova2
m (→‎Notes: Added alternative.)
 
(One intermediate revision by one other user not shown)
Line 20: Line 20:
endEvent
endEvent
</source>
</source>
== Notes ==
*This appears to have a bug that may cause akFurniture to be a piece of furniture you sat on previously, not the one you are currently sitting on.
*An alternative to this event is to attach a script to a magic effect, and have the condition for it in the spell window set to [[IsInFurnitureState]] == 1.00 if you need to run some code when the Player or Actor is sitting down.


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

Latest revision as of 09:12, 21 February 2016

Member of: Actor Script

Event called when this actor sits on a piece of furniture.

Syntax[edit | edit source]

Event OnSit(ObjectReference akFurniture)

Parameters[edit | edit source]

  • akFurniture: The furniture the actor just sat on.

Examples[edit | edit source]

Event OnSit(ObjectReference akFurniture)
  Debug.Trace("We just sat on " + akFurniture)
endEvent

Notes[edit | edit source]

  • This appears to have a bug that may cause akFurniture to be a piece of furniture you sat on previously, not the one you are currently sitting on.
  • An alternative to this event is to attach a script to a magic effect, and have the condition for it in the spell window set to IsInFurnitureState == 1.00 if you need to run some code when the Player or Actor is sitting down.

See Also[edit | edit source]