Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Is it possible to access private variables from Python?
I've been trying to get expressions like
Sprite.Value( 'privateValueName' )[/code:3vrx0x9k]
to work in python, but so far it seems like I only get back some kind of null value.
Develop games in your browser. Powerful, performant & highly capable.
[quote:2mya6rua]Is it possible to access private variables from Python?
Yep, exactly the way you posted. If the variable name you use does not match any of the Sprite's private variables NULL will be returned.
Okay awesome, I just built another test cap to try it out in a simpler environment and it works.
What worried me is that I had tried a simple test earlier and gotten back nothing, so I must have just done something wrong without noticing.