PDA

View Full Version : Set to Next - Verify Stack Object


MogHughson
13th Dec 2008, 5:20 PM
I've used the Set to Next primitive a few times now and am happy that I understand it. Very useful for enumerating through all sorts of things. There is one thing you can do with Set to Next that I really don't understand at all however and was wondering if anyone else had figured it out and could explain it to me.

What is this all about?

Set to Next(Stack Object ID, Verify Stack Object)


Cheers
Mog

J. M. Pescado
13th Dec 2008, 5:59 PM
Set to Next: Verify Stack Object is the same as Global 0x178. In fact, it is the guts of global 0x178. It just returns true if the Stack Object points to a legal Object Instance, and false if it does not. Nothing is actually set-to-nexted, it's just a peculiar lumping.

MogHughson
14th Dec 2008, 2:49 PM
Set to Next: Verify Stack Object is the same as Global 0x178. In fact, it is the guts of global 0x178. It just returns true if the Stack Object points to a legal Object Instance, and false if it does not. Nothing is actually set-to-nexted, it's just a peculiar lumping.

It was indeed global 0x0178 that I was looking in. On a multi-tile object it does have the affect of changing the tile that the stack object ID is set to and afterwards I am having to set it back to the one it was on before calling this so I was unsure whether it was doing anything else "important" that I might be undoing.

I guess it uses Set to Next so that it can enumerate through all the tiles in an object and verify that all the tiles are legal - that would explain why my Stack Object ID is updated.

Thanks J. M. Pescado - your insight was most useful :up:

J. M. Pescado
14th Dec 2008, 2:53 PM
If you use 0x178 instead, modifications STN performs to Stack Object will not stick when 0x178 returns.