Difference between revisions of "Activate"

359 bytes removed ,  00:46, 19 December 2007
→‎Buggy Bug Bug of a Weird, Weird Bug: Removed note - must've been trying to ues the ObjectID
imported>Haama
(→‎Buggy Bug Bug of a Weird, Weird Bug: Updated RunOnActivate info)
imported>Haama
(→‎Buggy Bug Bug of a Weird, Weird Bug: Removed note - must've been trying to ues the ObjectID)
Line 58: Line 58:
#When you use the ''RunOnActivate'' flag, the script of the activated object/item will run immediately, meaning the next line of the activator's script won't be processed until the entire activated script (including blocks other than [[onActivate]]) finishes. If the activated script doesn't have an [[onActivate]] block, it won't run.
#When you use the ''RunOnActivate'' flag, the script of the activated object/item will run immediately, meaning the next line of the activator's script won't be processed until the entire activated script (including blocks other than [[onActivate]]) finishes. If the activated script doesn't have an [[onActivate]] block, it won't run.
#You have to use an ''ActivatorID'' when using the ''RunOnActivateBlock'' flag.
#You have to use an ''ActivatorID'' when using the ''RunOnActivateBlock'' flag.
#You can't directly use an ''ActivatorID'' of an NPC. Instead, you have to set a temporary reference variable to the desired ''ActivatorID'', and use the variable in the ''ActivatorID'''s place. This is useful when using the ''RunOnActivateBlock'' flag. (I'm not sure what will happen for default activation. --[[User:Haama|Haama]] 18:42, 13 July 2007 (EDT))
#Calling '''''Activate''''' 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.
#Calling '''''Activate''''' 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.
#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.
Anonymous user