Difference between revisions of "Talk:Activate"
Jump to navigation
Jump to search
Standardized, a few extra notes
imported>Haama (→Can't activate whle on a horse: Belated confirmation) |
imported>Haama (Standardized, a few extra notes) |
||
Line 1: | Line 1: | ||
==Rewrite== | |||
Is it just me, or is a ''lot'' of Kkuhlmann's information here wrong? Activate blocks are done when called, not later, correct?<br /> | Is it just me, or is a ''lot'' of Kkuhlmann's information here wrong? Activate blocks are done when called, not later, correct?<br /> | ||
[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 10:54, 13 July 2007 (EDT) | [[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 10:54, 13 July 2007 (EDT) | ||
Line 49: | Line 50: | ||
*:--[[User:Tegid|Tegid]] 09:27, 14 April 2006 (EDT): By Atomic I mean, does the entire script block (or script) execute without interruption by another script, or can it be interrupted by another script mid-run and then come back and finish later? | *:--[[User:Tegid|Tegid]] 09:27, 14 April 2006 (EDT): By Atomic I mean, does the entire script block (or script) execute without interruption by another script, or can it be interrupted by another script mid-run and then come back and finish later? | ||
==Nesting== | |||
--[[User:Tegid|Tegid]] 00:40, 26 April 2006 (EDT) With MrFlippy's help, I believe I have found an issue with chained activations. If I have more than four objects which pass a single Reference down an activate chain, after the fourth pass, my reference is normally != to what it was when it started down the chain. (It does SOMETIMES make it to the 5th object). As an example. | --[[User:Tegid|Tegid]] 00:40, 26 April 2006 (EDT) With MrFlippy's help, I believe I have found an issue with chained activations. If I have more than four objects which pass a single Reference down an activate chain, after the fourth pass, my reference is normally != to what it was when it started down the chain. (It does SOMETIMES make it to the 5th object). As an example. | ||
<pre>scn Object1Script | <pre>scn Object1Script | ||
Line 74: | Line 76: | ||
And so on down to Object5, object 5 will NOT execute the code inside its if statement. That equality will evaluate to false. Am I missing something, or is this a bug based on something you couldn't imagine us wanting to do? | And so on down to Object5, object 5 will NOT execute the code inside its if statement. That equality will evaluate to false. Am I missing something, or is this a bug based on something you couldn't imagine us wanting to do? | ||
:I've [http://www.tesnexus.com/downloads/file.php?id=18334 posted a test] showing that you can, normally, have 5 called nested scripts running at once (6 including the original, calling script). It also shows you can't avoid the limitation by using a result script to call the activator.--[[User:Haama|Haama]] 05:28, 30 July 2008 (EDT) | |||
==Fake "Nesting"== | |||
* 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... 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) | :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) | ||
:::I've done it. A hint to the simplest way, not only to do it, but also to manage it: from a quest script or another object's script, use/set object variables that are triggering your stuff, exactly when you want it... ''set refObjectID.localVar to 1'', where a conditional block on localVar, within the refObjectID's GameMode block script, would trigger whatever stuff you wish for it to render. Like a "Master script" that is managing the cascading events from one single object's script that is NOT involved into that chain reaction (which object can be hidden in the player's cell, or that would have no other use than showing itself as well as doing this "orchestration" silently). --[[User:HawkFest|HawkFest]] 21:54, 16 April 2008 (EDT) | :::I've done it. A hint to the simplest way, not only to do it, but also to manage it: from a quest script or another object's script, use/set object variables that are triggering your stuff, exactly when you want it... ''set refObjectID.localVar to 1'', where a conditional block on localVar, within the refObjectID's GameMode block script, would trigger whatever stuff you wish for it to render. Like a "Master script" that is managing the cascading events from one single object's script that is NOT involved into that chain reaction (which object can be hidden in the player's cell, or that would have no other use than showing itself as well as doing this "orchestration" silently). --[[User:HawkFest|HawkFest]] 21:54, 16 April 2008 (EDT) | ||
True, this can be done, but it's not really nesting. Nesting means everything runs before the next line of code runs - this avoids a good chunk of timing issues ("orchestration") and would be much prefered.--[[User:Haama|Haama]] 05:28, 30 July 2008 (EDT) | |||
== RunOnActivateBlock Flag == | == RunOnActivateBlock Flag == | ||