User talk:CraftySentinel

From the CreationKit Wiki
Revision as of 23:48, 22 August 2013 by imported>CraftySentinel
Jump to navigation Jump to search

Activate - ObjectReference

Member Function of: ObjectReference Script

Activates this item with the specified reference as the activator.

Definition

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


Parameters

Parameters Description
ObjectReference akActivator
The ObjectReference to activate this Object.
bool abDefaultProcessingOnly = false
If true, no OnActivate event will be sent to any scripts and the object will ignore the blocked flag.(Default Value: False)

Return Value

Type - bool
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

ObjectReference
Events
OnActivate, OnAttachedToCell, OnCellAttach, OnCellDetach, OnCellLoad, OnClose, OnContainerChanged, OnDestructionStageChanged, OnDetachedFromCell, OnEquipped, OnGrab, OnHit
Functions
BlockActivation, AddInventoryEventFilter, AddItem, AddToMap, ApplyHavokImpulse, BlockActivation, CalculateEncounterLevel, CanFastTravelToMarker, ClearDestruction, CountLinkedRefChain, CreateDetectionEvent