More flexible variables in C3

  • Ashley

    Variables in C2 are sub-optimal, for example it's not possible to pass a variable name as an argument and access it by name during runtime, this is very very inconvenient. I remember there were some security concerns and this is by design, but it is a bad design.

    Will the situation with variables be different in C3?

  • Maybe workaround by dictonary, which has string key and value pairs.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rexrainbow

    yes, man - that's what I am doing now, when I need this flexibility. but these are still not variables and dictionary key-value pairs are not that easy to work with, compared to variables.

    I think a separate behavior could solve it, basically creating variables and variables groups inside the behavior, being able to pass their names or even create new ones on runtime.

  • I think what you are asking for is a pointer or reference to a variable? I find it hard to see how that fits in to the event system, and with event variables there are some tricky issues around the variable scope as well (e.g. should you be able to pass a pointer to a variable to somewhere outside of its scope? That is an error in some languages like C++). Either way the solution would probably be to reference variables by a string of their name, and that's exactly what the Dictionary object already does!

  • I think I understand now

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