Is the problem that properties live inside of script instances, not the
sprite itself? I know you can access property variables of behaviors attached to sprites if you know the name:


put sprite(2).pSomeVar
-- "this is my var"

but if you want to access the list of variables of the script object, you may have to deal with the scriptinstancelist...

I was just dealing with this a day or two ago on Direct-L but with respsect to parent scripts. You can access them like you mention without a hitch, but my guess is that since sprites aren't standard 'instances' of scripts, you may have to get at the instance to access it with bracket notation or the getAt methods...

~Mathew


roymeo wrote:

I've got a parent script which does your standard Mass-Spring-Damper sort of boinging. I'd like to be able to pass it a sprite object and a #Property and have it automatically get/set that sprite's property.


So if I want to attach it to sprite(x).locH, I send it sprite(x) and #locH which are params oSprite and sProp

and I can address
sprite(x).locH

But you can't address
sprite(x).sProp  or
sprite(x).getProp(sProp) etc.

Is there a way to do this without using do statements?

My brain is itching in that way that means I'm either missing something obvious or due for my next trepanning session.

roymeo

----------
roymeo(AT)brokenoffcarantenna.com
----------
A person who eats meat
wants to get his teeth into something
A person who does not eat meat
wants to get his teeth into something else
If these thoughts interest you even for a moment
you are lost
- Leonard Cohen


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to