Difference between revisions of "OnActivate"
→Notes: Oops, tested that long ago
imported>Haama m (Standardized) |
imported>Haama (→Notes: Oops, tested that long ago) |
||
Line 9: | Line 9: | ||
*If you want to do something specific depending on what activated the object, use [[IsActionRef]] or [[GetActionRef]] inside the OnActivate block. They won't return the correct ActionRef in any other block. | *If you want to do something specific depending on what activated the object, use [[IsActionRef]] or [[GetActionRef]] inside the OnActivate block. They won't return the correct ActionRef in any other block. | ||
*This block (and | *This block (and the entire script) runs immediately when called from an external script. There were a few things that were posted before that this should clarify: | ||
#Activation occurs before the next line of code of the calling script is processed, and not in the next frame | #Activation occurs before the next line of code of the calling script is processed, and not in the next frame | ||
#Any number of objects can activate one object, within one frame, and they will all be run (though see notes on [[Activate#Nesting|Nesting]]) | #Any number of objects can activate one object, within one frame, and they will all be run (though see notes on [[Activate#Nesting|Nesting]]) |