-
|
I was curious what it was because with a different hscript class I use they had a parenting system. |
Beta Was this translation helpful? Give feedback.
Answered by
Kriptel
Dec 5, 2024
Replies: 1 comment 1 reply
-
|
By setting source var object:FlxSprite = new FlxSprite(100,0);
var script:RuleScript = new RuleScript();
script.superInstance = object;
// ... script executescript trace(x); // 100, because sprite's x value is 100
x = 200;
trace(x) // 200, It will also change for the object |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
rodney528
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By setting
superInstanceto a non-null value, you are telling scripts that it should change variables in the parent class, if any exist.source
script