Difference between revisions of "Activate"
Jump to navigation
Jump to search
Added Nesting notes
imported>DragoonWraith (CS 1.0) |
imported>Haama (Added Nesting notes) |
||
Line 82: | Line 82: | ||
activate player 1 | activate player 1 | ||
end | end | ||
(I doubt this, see Nesting info below--[[User:Haama|Haama]] 00:32, 13 July 2007 (EDT)) | |||
Line 94: | Line 96: | ||
endif | endif | ||
end | end | ||
==Nesting== | |||
You can nest activations within other activations. For example, a quest script activates an activator | |||
SomeActivator.Activate player, 1 | |||
which in turn activates another activator | |||
<pre>scn SomeActivatorScript | |||
begin onActivate | |||
SomeOtherActivator.Activate player, 1 | |||
end</pre> | |||
Note, however, that you can only nest 5 activations at a time. At a time is a little hard to define here, since onActivate blocks run instantly and before the next line of code is processed. This really means that if 4 other scripts are still being processed and an activation is made during the 5th script, that last activation will be ignored. This applies to any activation, even if they're different objects or different scripts. | |||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category: Functions (CS 1.0)]] | [[Category: Functions (CS 1.0)]] | ||
[[Category: Object Functions]] | [[Category: Object Functions]] |