Editing Activate

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.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 56: Line 56:
If the calling reference doesn't have an ActionRef (for example, if the calling reference is a quest) then the object won't be activated and the line will be ignored (the calling reference's script will continue).
If the calling reference doesn't have an ActionRef (for example, if the calling reference is a quest) then the object won't be activated and the line will be ignored (the calling reference's script will continue).


==Guaranteed CTD==
Calling '''activate player 1''' on a container with a scripted item on it will lead to a CTD.  See [[Crashes#Activating_a_Container_.28including_NPC.29|Activating a Container (including NPCs)]] for more info.


==Buggy Bug Bug of a Weird, Weird Bug==
==Buggy Bug Bug of a Weird, Weird Bug==
Line 65: Line 63:
#Calling '''''Activate''''' with the RunOnActivateBlock set to 0 on an object which doesn't have an '''''onActivate''''' block in its script, or has no script at all, will prevent that object from being activated normally ever again. For example, if Activate is called on an unscripted container, the player will no longer be able to open that container by activating it with the spacebar; similarly, calling Activate on unscripted NPCs prevents the player from being able to talk to them. Therefore, use RunOnActivateBlock = 0 only if you know for sure the object has an OnActivate block and, for some reason, you don't want that code to run.   
#Calling '''''Activate''''' with the RunOnActivateBlock set to 0 on an object which doesn't have an '''''onActivate''''' block in its script, or has no script at all, will prevent that object from being activated normally ever again. For example, if Activate is called on an unscripted container, the player will no longer be able to open that container by activating it with the spacebar; similarly, calling Activate on unscripted NPCs prevents the player from being able to talk to them. Therefore, use RunOnActivateBlock = 0 only if you know for sure the object has an OnActivate block and, for some reason, you don't want that code to run.   
#You can use 'Activate player, 1', while an item is in an inventory, to have it run it's own [[onActivate]] block. However, you have to place the onActivate block on the top of the script. See [[Crashes#Activate_Self|Activate Self]] for more info.
#You can use 'Activate player, 1', while an item is in an inventory, to have it run it's own [[onActivate]] block. However, you have to place the onActivate block on the top of the script. See [[Crashes#Activate_Self|Activate Self]] for more info.
#[[Crashes#Activating_a_Container_.28including_NPC.29|Activating a Container (including NPCs)]]
#If you add a MessageBox to the OnActivate block of a container and then issue the Activate command somewhere after the call to the MessageBox, the in-game result will be an opened inventory dialog box of the container with a MessageBox behind it without the ability to select any items in the inventory screen or be able to exit the inventory screen or be able to see the message in order to click the OK button...basically, you will be stuck.
#If you add a MessageBox to the OnActivate block of a container and then issue the Activate command somewhere after the call to the MessageBox, the in-game result will be an opened inventory dialog box of the container with a MessageBox behind it without the ability to select any items in the inventory screen or be able to exit the inventory screen or be able to see the message in order to click the OK button...basically, you will be stuck.


Please note that all contributions to the Oblivion ConstructionSet Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see CSwiki: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)