Private Variables not working or I am doing something wrong?

This forum is currently in read-only mode.
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • I have came across something strange while making a test script for scaling boxes. I was trying for a couple of hours to get a box to scale in height. However, it was not working at all and I was trying it for hours. I then decided to switch to a global variable and behold, it worked! I do not know why it isn't working with the private variable.

    So, I have the .cap for you all. I probably did something stupidly wrong (If it is on the wiki I will facepalm).

    The funny thing is, the debug shows the private variable working, but the text is not picking it up for a reason I can't explain. The Private variable seems to work, but it doesn't get passed to the text object (which I don't get).

    Anyway, here's the cap. Anyone have an explanation for this?

    http://www.mediafire.com/?zwjtalggjjt

  • It's a known bug of Panel object, you can't reference it's private variables properly. Go kick David to fix it.

  • Pretty sure I read it's fixed in at least an unstable release, but what always worked for me was that instead of writing Panel('whatever') or just 'whatever', I wrote Panel.Variable('whatever').

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Pretty sure I read it's fixed in at least an unstable release, but what always worked for me was that instead of writing Panel('whatever') or just 'whatever', I wrote Panel.Variable('whatever').

    Looks like this is indeed the case, the private variables for Panel work perfectly for me in 0.99.85. 'value', Panel('value') or Panel.Value('value') all work just fine. (Sadly, Light's private variables are still broken)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)