Difference between revisions of "Linked List Tutorial"
Byline removed
imported>Gregbert m ({{Unfinished}}) |
imported>QQuix (Byline removed) |
||
Line 1: | Line 1: | ||
{{Unfinished}} | {{Unfinished}} | ||
{{Errors}} | {{Errors}} | ||
Preamble note: Since OBSE has added array manipulation to Oblivion script language, the implementation described in this article is only meaningful for modders that don't want to use OBSE in their mods. | |||
==Unfortunate Realities== | ==Unfortunate Realities== | ||
Before we get started, let me address some unfortunate realities. | Previous tutorial: [[Dynamic Storage]] | ||
Before we get started, let me address some unfortunate realities. As mentioned, the code in the previous tutorial is just conceptual and won't work. You can't call | |||
<pre> | <pre> | ||
set Curr.Child to Something | set Curr.Child to Something | ||
</pre> | </pre> | ||
Because you cannot access the script variable ''Child'' thru a ref var ''Curr''. | |||
That means I can't call it on any of the objects I create in game. So that causes a serious problem. Fortunately there is a way to address it. | |||
==Creating a Real World Linked List== | ==Creating a Real World Linked List== | ||
Line 309: | Line 313: | ||
end</pre> | end</pre> | ||
In both | In both version we still need to handle someone ASKING for data, so we also add this if block inside the OnActivate block. | ||
<pre> | <pre> | ||
if (dataRequest) | if (dataRequest) |