User talk:QQuix/Array sample code

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

More levels[edit source]

I take it I can add more levels by making more activators and expanding this part?

if xSelf == aaqqArrayDump
...
elseif xSelf == aaqqArrayDumpL1
...
elseif xSelf == aaqqArrayDumpL2
...
elseif xSelf == aaqqArrayDumpL3
...
elseif xSelf == aaqqArrayDumpL4
...
elseif xSelf == aaqqArrayDumpL5
...
elseif xSelf == aaqqArrayDumpL6
...
elseif xSelf == aaqqArrayDumpL7
...
etc.
endif

A small suggestion, a way to limit the nesting depth for certain arrays. It's not a problem for me to add but others might find that useful aswell. Oh and great work ofcourse! Kyoma 02:52, 25 May 2009 (EDT)

I added a comment at the end of the if block as a reminder for adding levels.
I also added support for limiting the nesting depth, as you suggested. Which also prevents recursion beyond the last level supported (initialized). Great suggestions, thanks.
And feel free to change the contents. It is in my user area because I wouldn't know where to place it in the WIKI and because I am not comfortable with my English. QQuix 15:28, 25 May 2009 (EDT)