GridTree.PollGrid(Name, X, Y, Data Type, Max)
Sorry, but I'm somewhat confused at whats going on with the expression.
I get name, and x,y... although an x,y for every x,y is blowing my mind, but Data Type needs a bit more of an explanation.
The Data Types "BubbleX", and "ColorR", etc, are um, I dunno...
Are they labels you made up, or are they undocumented system expressions?
If they're plugin specific, that's fine, but users need some sort of reference to all of them.
Thats kind of like loumu's dungeon plug using keywords like wall, and rock without an indication of of value.
Also, on "BubbleX", isn't that a reference to an object being created within the same action?
Thanks
As far as X, Y's within X, Y's goes. That's the nature of the plugin. It's hard to comprehend sometimes, even for me. Just remember that when you Poll Grid you want to make sure that you've set your current position for every grid above the current one. You don't need to set your position on the grid you are polling, because that's what X and Y are for in the expression. Of course it wouldn't hurt to set the position anyway, but for large amounts of polling that might be processor intensive for reasons that would take a while to explain. That's why you can poll along a grid without setting position.
The data type is specific to the plugin, but it isn't explicit. There is no list of them - you can make up any data type you like. You could set it to "badjfo9a8d789dabfiausd" or " "fnord" and it would still behave the same.
What that actually is is a numeric seed for a type of data, but to make it easier to understand I had it accept strings. The string is then hashed and the hash is used to seed the data type. So basically it is anything you want it to be, as long as you always use that specific word to reference whatever you are trying to look for. Because that word/string/hash/value is used to modify the GRID seed - which allows you to poll for multiple things within the same grid. Does that make sense? Think of each point in the grid like a set of gym lockers, and the data type is the locker you are selecting. You are not drilling down into the next grid - merely specifying that you are checking out something different on the current one.
So notice how I poll for R, G, and B, all within the same grid - at the same locations - and with the same maximum values. Since this is persistent - technically R G and B should all be the same number. That's what data type does. You specify a unique identifier for what you are looking for - and that identifier can be anything you like - and it splits your grid up into clones with different sets of data. Pretty nifty eh?