Editing
BlockActivation - ObjectReference
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Category:Scripting]] [[Category:Papyrus]] '''Member of:''' [[ObjectReference Script]] Blocks, or unblocks, normal activation processing for this reference. References with blocked activation will still send [[OnActivate - ObjectReference|OnActivate]] events to scripts attached to them. == Syntax == <syntaxhighlight lang="papyrus"> Function BlockActivation(bool abBlocked = True) native </syntaxhighlight> == Parameters == *abBlocked: Whether to block or unblock activation. **'''Default''': True == Return Value == None. == Examples == <syntaxhighlight lang="papyrus"> ; Blocks this door from processing activation normally MyDoor.BlockActivation() </syntaxhighlight> <br/> <syntaxhighlight lang="papyrus"> ; Tells the door to handle activation normally MyDoor.BlockActivation(false) </syntaxhighlight> == Notes == * If you block activation on a reference, the reference will no longer perform its "normal" activation processing. It won't be picked up, opened, etc. However, the script [[OnActivate - ObjectReference|OnActivate]] block will still run, but only on the same script which has the BlockActivation() function set. All other OnActivate() events in other scripts attached to the same reference will be ignored. * Because of the way script events work, chances are that the object has already done (or ignored) its default activation processing by the time the script receives the event, so calling BlockActivation() on the object in the [[OnActivate - ObjectReference|OnActivate]] block will not affect the current activation. * If a script calls [[Activate - ObjectReference|Activate]]() on an object reference which has blocked activation, the [[OnActivate - ObjectReference|OnActivate]] block on that script will run, but the object will not process activation normally. (Unless the default processing only parameter is true) * BlockActivation does not disable the 'Activate' UI prompt on the object. * If an ObjectReference which has BlockActivation() applied to it is linked to another ObjectReference which can be activated normally, this linked object will instead be activated (confirmed with a BlockActivation() applied to a note object that is linked to a book object, the book object was instead activated) * '''IMPORTANT:''' If you call BlockActivation from a ReferenceAlias script for an alias that is pointing to an object, the activation block '''will not''' be automatically removed when the alias stops pointing at the object (such as when the quest ends). == See Also == *[[ObjectReference Script]] *[[Activate - ObjectReference]] *[[IsActivationBlocked - ObjectReference]]
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Landing page
Tutorials
Game Systems
Editor Reference
Scripting Reference
Recent changes
Help
Tools
What links here
Related changes
Special pages
Page information
Page values