Scope functions and containers

I'm thinking again about how scope is handled for containers. isopen and transparent are pretty simple, but I was wondering if it might make sense to have a system that gives users a little more flexibility. For example, allowing an object to have a child scope script, working in the same way as the backdrop scope script, which returns a list of its visible and/or reachable children.

The scope functions could call this script to populate item lists; or use the existing system as a default if it isn't found. This would introduce minimal overhead where not used (just checking for the existence of an attribute), and would allow things like a box which has buttons on it, or a partly-open container that only reveals some items.


K.V.

Sounds good.

I think an easy way to list (and/or run scripts for) child objects would be a good thing to have for all objects.


I was thinking about a script attribute (or delegate; though it's probably not worth the overhead) which can be called, and adds items to a list. Maybe with parameters so that it can include/exclude visible-but-unreachable items, and/or scenery objects.

Maybe also a similar script attribute that generates the "(It contains foo, bar, and baz)" string for object lists; so a refrigerator could say "(It contains beef, onions, and peppers, and there is a note stuck on the front)"

I think I can see how I'd implement this, but not 100% yet.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums