Difference between revisions of "Talk:OBSE Wish List"
Jump to navigation
Jump to search
no edit summary
imported>Scruggs (getting local references) |
imported>Scruggs |
||
Line 114: | Line 114: | ||
::::I have no idea how OB stores information about references in the current cell, but my ideal (within the realm of possibility) implementation would be similar to the new inventory functions: one function returns the number of references of the specified type in the current cell, and another returns a reference to one of those. i.e.: | ::::I have no idea how OB stores information about references in the current cell, but my ideal (within the realm of possibility) implementation would be similar to the new inventory functions: one function returns the number of references of the specified type in the current cell, and another returns a reference to one of those. i.e.: | ||
<pre>set numDoors to getNumLocalReferences 10 ; assuming 10 is the code for doors | <pre>set numDoors to getNumLocalReferences 10 ; assuming 10 is the code for doors | ||
set door1 to getLocalReference 1 ; return the first door found | set door1 to getLocalReference 10 1 ; return the first door found | ||
set door5 to getLocalReference 5 ; return the 5th</pre> | set door5 to getLocalReference 10 5 ; return the 5th</pre> | ||
::::Basically similar to MWSE's implementation, except allowing you to jump to any reference in the list without iterating. [[User:Scruggs|Scruggs]] 20:53, 3 August 2006 (EDT) | ::::Basically similar to MWSE's implementation, except allowing you to jump to any reference in the list without iterating. [[User:Scruggs|Scruggs]] 20:53, 3 August 2006 (EDT) |