Difference between revisions of "Talk:Activate"

Jump to navigation Jump to search
498 bytes added ,  14:13, 12 April 2006
no edit summary
imported>Kkuhlmann
imported>Tegid
Line 11: Line 11:
* All "action" block types (OnActivate, OnEquip, OnAdd, etc.) work by setting a flag on the script when the action occurs. The next time the script runs, if the appropriate block flag is set, that block is executed, and the flag is reset (so it doesn't run it more than once for a single action).
* All "action" block types (OnActivate, OnEquip, OnAdd, etc.) work by setting a flag on the script when the action occurs. The next time the script runs, if the appropriate block flag is set, that block is executed, and the flag is reset (so it doesn't run it more than once for a single action).
* Object scripts only run if the object is in the currently loaded area -- where the player is. So calling Activate on something that isn't loaded will set the flag for that action, but won't actually trigger the script (it will trigger the next time the object's script is run). NPC scripts (on persistent NPCs) do run when they're not loaded, but only when their AI is updated, which can happen as infrequently as every 15 game minutes.
* Object scripts only run if the object is in the currently loaded area -- where the player is. So calling Activate on something that isn't loaded will set the flag for that action, but won't actually trigger the script (it will trigger the next time the object's script is run). NPC scripts (on persistent NPCs) do run when they're not loaded, but only when their AI is updated, which can happen as infrequently as every 15 game minutes.
:--[[User:Tegid|Tegid]] 15:13, 12 April 2006 (EDT) So first question.  That reset happens when the OnActivate block starts or stops?  (So if I send another activate before it is finished with its block, will it be cleared when its block ends and therefore never happen?)  Second, as long as I've used PlaceAtMe to create this object, the second section shouldn't apply correct?  If this is working how I think it is from your description, I could work around it using a GameMode block and a flag.
Anonymous user

Navigation menu