Layout variables

This forum is currently in read-only mode.
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • There are global and private variables as well as array/hash/python options. However, I believe it would make sense to have Layout-specific variables as well. Too often I find myself using variables that pertain to the current layout only.

    These variables could be set to "persist" - remember the value after layout is closed - or "forget" - reset to the default value after the layout is closed.

    These variables would be accessible through Layout properties as well as system expressions. Perhaps local('variable') just like global('variable')?

    Should the need to retrieve other layouts' variables arise, I suppose that could be done by adding another expression: get layout variable(layout, variable) or something.

    I reckon this would be of great help. I feel such a layout-specific variable is the missing link between global and object variables.

  • just use private variables with a controller object you"ll get the same effect

  • Private variables on a sprite is a good workaround but not perfect, since you have an entire sprite on an object that has a position, angle etc. I've collected a few nice ideas for better handling of variables for Construct 2, but I doubt things will change from as they are now.

  • This was requested before, and the devs have said "possibly, but not until C2."

    In fact, you were in that thread arguing against Layout Variables, Mipey... so, uh... yeah. I guess you had a change of heart?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Kind of. Sprites add to the overhead, it does show when you are working on a major project.

  • Hehe, it's cool . Anyway, Aeal's link to his VBank plugin on page two of that thread still works, so you might want to grab it. It just stores variables without having any sprite information.

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