Difference between revisions of "OnActivate"
Jump to navigation
Jump to search
imported>Kkuhlmann |
imported>Tegid (Added GetActionRef to the see also part/Added information on results of calling Activate) |
||
Line 2: | Line 2: | ||
begin OnActivate | begin OnActivate | ||
This block will be run once when the scripted reference is activated. | This block will be run once when the scripted reference is activated. | ||
Note that this will prevent normal activation of the object. To use the object's default activation you must call Activate on it. If you want to do something specific depending on what activated the object, use IsActionRef inside the OnActivate block. | Activating the scripted reference will cause the "Activated Bit" to be set. So multiple calls to Activate a single reference in immediate succession will result in a single run through the OnActivate block. | ||
Note that this will prevent normal activation of the object. To use the object's default activation you must call [[Activate]] on it. If you want to do something specific depending on what activated the object, use [[IsActionRef]] inside the OnActivate block. | |||
Note that the activator type of object has NO default activation. | Note that the activator type of object has NO default activation. | ||
Line 11: | Line 13: | ||
[[Begin]]<br> | [[Begin]]<br> | ||
[[IsActionRef]] | [[IsActionRef]] | ||
[[GetActionRef]] | |||
[[Category: Commands]] | [[Category: Commands]] |
Revision as of 21:07, 16 April 2006
Syntax:
begin OnActivate
This block will be run once when the scripted reference is activated.
Activating the scripted reference will cause the "Activated Bit" to be set. So multiple calls to Activate a single reference in immediate succession will result in a single run through the OnActivate block.
Note that this will prevent normal activation of the object. To use the object's default activation you must call Activate on it. If you want to do something specific depending on what activated the object, use IsActionRef inside the OnActivate block.
Note that the activator type of object has NO default activation.