Difference between revisions of "Template:Function Table"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>CraftySentinel
m (Last minor correction)
Line 1: Line 1:
<includeonly>
[[Category:Scripting]]
{{!}} '''[[{{{1}}} - {{{2}}}{{!}}{{{1}}}]]''' {{#ifeq:{{{skse}}}|yes|{{SKSESup}} }}
[[Category:Papyrus]]
{{!}} '''{{{2}}}'''
'''Member of:''' [[ObjectReference Script]]
{{!}} {{{3}}}
 
{{!}}-
Activates this item with the specified reference as the activator.
</includeonly>
 
== Syntax ==
<source lang="papyrus">
bool Function Activate(ObjectReference akActivator, bool abDefaultProcessingOnly = false) native
</source>
 
== Parameters ==
*akActivator: Who will activate this object.
*abDefaultProcessingOnly: If true, no OnActivate event will be sent to any scripts and the object will ignore the blocked flag.
**'''Default''': False
 
== Return Value ==
True if default activation processing was performed (and succeeded). Will return false if activation was blocked, or the activation failed for some other reason.
 
== Examples ==
<source lang="papyrus">
; Have the player 'activate' the door
NeatDoor.Activate(Game.GetPlayer())
</source>
<br>
<source lang="papyrus">
; Have the player 'activate' the door, bypassing any blocked activation and NOT sending an event to any script
NeatDoor.Activate(Game.GetPlayer(), true)
</source>
 
== Notes ==
If the object reference has had activation processing blocked, this will still send the [[OnActivate - ObjectReference|OnActivate]] event to scripts attached to the object, but will ignore normal processing (i.e. picking up the object, opening the door, etc). Unless, of course, you have the abDefaultProcessingOnly parameter set to true, in which case ''no'' event is sent, and the block flag is ignored.
 
== See Also ==
*[[ObjectReference Script]]
*[[UseIdleMarker (Procedure)]]
*[[Activate]]
*[[Activate (Procedure)]]
*[[Activator]]
*[[BlockActivation - ObjectReference]]
*[[OnActivate - ObjectReference]]

Revision as of 21:21, 1 December 2021

Member of: ObjectReference Script

Activates this item with the specified reference as the activator.

Syntax

bool Function Activate(ObjectReference akActivator, bool abDefaultProcessingOnly = false) native

Parameters

  • akActivator: Who will activate this object.
  • abDefaultProcessingOnly: If true, no OnActivate event will be sent to any scripts and the object will ignore the blocked flag.
    • Default: False

Return Value

True if default activation processing was performed (and succeeded). Will return false if activation was blocked, or the activation failed for some other reason.

Examples

; Have the player 'activate' the door
NeatDoor.Activate(Game.GetPlayer())


; Have the player 'activate' the door, bypassing any blocked activation and NOT sending an event to any script
NeatDoor.Activate(Game.GetPlayer(), true)

Notes

If the object reference has had activation processing blocked, this will still send the OnActivate event to scripts attached to the object, but will ignore normal processing (i.e. picking up the object, opening the door, etc). Unless, of course, you have the abDefaultProcessingOnly parameter set to true, in which case no event is sent, and the block flag is ignored.

See Also