Difference between revisions of "Talk:OBSE Wish List"

Jump to navigation Jump to search
4 bytes added ,  11:28, 4 August 2006
m
→‎example:: formatting
imported>GreyWanderer
imported>DragoonWraith
m (→‎example:: formatting)
Line 112: Line 112:
::::Well, I noted that above. cdcooley said opposing to MWE's, this function was "not optimized". I assumed that the mandatory ref as a parameter was one reason. That's why I made it optional; only use it if you need it. [[User:GreyWanderer|Grey]] 12:19, 4 August 2006 (EDT)
::::Well, I noted that above. cdcooley said opposing to MWE's, this function was "not optimized". I assumed that the mandatory ref as a parameter was one reason. That's why I made it optional; only use it if you need it. [[User:GreyWanderer|Grey]] 12:19, 4 August 2006 (EDT)


::::Iterating through local references would be very nice. AoE spells will get you references to actors and nothing else - activators, furniture, containers, and doors will only run spell scripts if directly hit by them, and carriable items, statics, flora, etc can't run spell scripts at all.
:::::Iterating through local references would be very nice. AoE spells will get you references to actors and nothing else - activators, furniture, containers, and doors will only run spell scripts if directly hit by them, and carriable items, statics, flora, etc can't run spell scripts at all.


::::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 10 1 ; return the first door found
set door1 to getLocalReference 10 1 ; return the first door found
set door5 to getLocalReference 10 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)
:::::The problem I saw with this is that I personally don't know how much "lists" exist. It might just be too much work to sort all items by type. Then again ... if this sorting get's done in idle time (i.e. all the time, so that each time only a small portion needs to be re-sorted), this could have a significant good impact on performance. It could also mean though that general performance decreases when running obse. But now that I think of it again ... it is certainly better if the executable did this sorting in native code rather than us doing it in pseudo-code. [[User:GreyWanderer|Grey]] 12:19, 4 August 2006 (EDT)
::::::The problem I saw with this is that I personally don't know how much "lists" exist. It might just be too much work to sort all items by type. Then again ... if this sorting get's done in idle time (i.e. all the time, so that each time only a small portion needs to be re-sorted), this could have a significant good impact on performance. It could also mean though that general performance decreases when running obse. But now that I think of it again ... it is certainly better if the executable did this sorting in native code rather than us doing it in pseudo-code. [[User:GreyWanderer|Grey]] 12:19, 4 August 2006 (EDT)

Navigation menu