HELP understanding SET PARENT TO effect on inheritance

I have a setup where several sprites declare PARENTS programmatically in cycles, depending on conditions.

On the first instance of declaration, CHILD sprites inherit the local Vars of the PARENT sprite correctly, and AUTOMATICALLY any value changes to the Parent local sprites are reflected in the CHILD's inherited versions.

However, once I SET PARENT TO "nothing or blank" and break the inheritance link for the sprite, then on the subsequent PARENT re-establishment the inheritance is not AUTOMATICALLY active for the inherited variables. I have to go into the Variables list and R-click and select INHERIT for them to become active again.

  1. Why is that ?

  2. Is there a way to programmatically force the INHERIT tick mark for an inherited variable ?

NOTE: This might be somehow related to the item: Inherited Variables
There a comment was made (Jens is of the opinion that what it does is correct. Stay tuned for the results of the argument...) which did not have a follow up.

I am hoping the answer to this question will resolve both.

THX.

Hi Turgut,

you can programmatically let a child inherit a particular attribute using its - drum roll - inherit block!
When you remove the parent, all current attributes become shadowed by the - orphaned - child, so it becomes independent of the parent. That's why there is a way to - again - establish inheritance either through the GUI or using the inherit command.

Is this what you were looking for?

Thanks @jens. I was too focused on setting and releasing PARENT status, and totally ignored the INHERIT block.
By the way, I got "TWO" drum-rolls this week from you ! Is there an award for n number of rolls ? Maybe like BAN me from the forum for a while for NOT paying attention to details !!!
:wink:

Haha! Don't worry, I'm just really proud of myself remembering how Snap! works while I'm immersed in its innards :slight_smile: