Adding layout variable scope

0 favourites
  • 5 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Right now we have global and local variables and it works really well. I might suggest adding layout variables. The reason for this is that a lot of time I use triggers and other level specific game objects.

    Having a layout variable would make things look and feel a lot better. I could see what variables are in that layout. If I use the trigger example I currently have to label them like this

    TriggerL1T1

    TriggerL2T2

    ect.

    But with the local variable I could just say

    TriggerT1

    ect

    On top of that, if they were a different color at the top it would make things visually easier.

    Just a thought. Keep being awesome Scirra.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm, this is old, but I still do not see the feature around. I'd like to support this suggestion.

    Currently, I'm using some sprites as buttons, and I'd like for them to come up variables as to which is clicked so I can properly control my fading in and out. Just to make sure they do not overlap with other variables from other Layouts.

    Hope you guys can also support this in the future, I'm having a great experience so far. Thank you! :)

  • In the event-sheet editor, right click and choose "Add Local Variable" :P

  • Event sheets are not matched one-to-one with layouts - you can include one event sheet in multiple other event sheets, for example. So there's no obvious way in the event system to make a global variable but unique to a particular layout. I think the best way is just to use globals, or static local variables in groups, or similar.

  • I was actually going to suggest this but using a dedicated object for layout variables works just as well o.o

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