Difference between revisions of "Talk:Activate"

Jump to navigation Jump to search
362 bytes added ,  08:04, 13 September 2007
m
imported>HawkFest
imported>HawkFest
Line 72: Line 72:
* At the bottom of the article, "[[Activate#Nesting|Nesting]]" section, it is written:
* At the bottom of the article, "[[Activate#Nesting|Nesting]]" section, it is written:
::''You can only nest 5-6 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 (the script skips the line). This applies to any activation, even if they're different objects or different scripts.''
::''You can only nest 5-6 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 (the script skips the line). This applies to any activation, even if they're different objects or different scripts.''
:Maybe that you problem is due to some limit imposed by the engine over piling (or stacking) [[onActivate]] processes : since the [[onActivate|onActivate block]] executes fully before going on to the next line of code, a stack is taking place here, as would do a recursive method... As such using the [[GameMode|GameMode block]] that executes every frame would be more appropriate imho, given the provision of some conditional control to recreate what you want to do. Be aware to put any onActivate control block before the [[GameMode|GameMode block]] for any reference involved in the chain, and which could serve as some "State observer" setting variables controling its GameMode block - and thus a chain of events that could involve multiple object references/path/scenario/story lines/effects/whatever... Note that I am not talking about an "instantaneously chained" multiple events triggered via onActive blocks - at most 4 to 5 considering what you said (which would be "normal" in regards to the "fps factor" during game playing)-, but about a chain reaction happening frame-by-frame (you could mix both methods btw). Although the later is only based over logical assumptions in regards to all the info provided around, maybe I'll try this some other time in a mod, as a "proof of concept"... --[[User:HawkFest|HawkFest]] 23:54, 11 September 2007 (EDT)
:Maybe that you problem is due to some limit imposed by the engine over piling (or stacking) [[onActivate]] processes : since the [[onActivate|onActivate block]] executes fully before going on to the next line of code, a stack is taking place here, as would do a recursive method... As such using the [[GameMode|GameMode block]] that executes every frame would be more appropriate imho, given the provision of some conditional control to recreate what you want to do. Be aware to put any onActivate control block before the [[GameMode|GameMode block]] for any reference involved in the chain, and which could serve as some "State observer" setting variables controling its GameMode block - and thus a chain of events that could involve multiple object references/path/scenario/story lines/effects/whatever... I'd try this using [[tokens]] instead of the actual objects needed to be manipulated during the chain of events (the scripting of these object staying thus independent from the FX or the wanted "chain reaction" in itself, making them consequently and independently reusable for some other stuff you could want them to do or behave in another stage or scenario). Note that I am not talking about an "instantaneously chained" multiple events triggered via onActive blocks - at most 4 to 5 considering what you said (which would be "normal" in regards to the "fps factor" during game playing)-, but about a chain reaction happening frame-by-frame (you could mix both methods btw). Although the later is only based over logical assumptions in regards to all the info provided around, maybe I'll try this some other time in a mod, as a "proof of concept"... --[[User:HawkFest|HawkFest]] 23:54, 11 September 2007 (EDT)
Anonymous user

Navigation menu