[Ended][Suggestion] Reset all but some global variables

0 favourites
  • 12 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Hey, I have had multiple games where I had to reset a hand full of global variables that I needed for a couple of layouts and I had to set every variable to it's default state manually.

    Sometimes it would take up quite a bit of space so I would hide it under a blank sub-event under the "On Start Of Layout" main event.

    Point is, I think having a single action witch would let you either white list some variables you would want to reset or black list ones you did not want to reset would make things a bit niter looking =D

  • I normally use functions for filtering global variable reset. I don't really think this is a need but if Ashley somehow makes a creative and interactive design for this feature for C3 then.... +1

  • Um, so instead of making events to change a few variables, you want to change a feature to allow you to choose what variables not to change?

  • Um, so instead of making events to change a few variables, you want to change a feature to allow you to choose what variables not to change?

    I think he just wants a way to reduce the repetitive work that's involved in setting multiple variable values at once.

    I guess C3 could bring changes to this by using special "filters" where you can select your variables.

    So basically instead of a drop-down menu with the option of only selecting one variable, a listview with all variables were you can select multiple ones could be the solution to this and make things a lot easier.

  • Um, so instead of making events to change a few variables, you want to change a feature to allow you to choose what variables not to change?

    > Um, so instead of making events to change a few variables, you want to change a feature to allow you to choose what variables not to change?

    >

    I think he just wants a way to reduce the repetitive work that's involved in setting multiple variable values at once.

    I guess C3 could bring changes to this by using special "filters" where you can select your variables.

    So basically instead of a drop-down menu with the option of only selecting one variable, a listview with all variables were you can select multiple ones could be the solution to this and make things a lot easier.

    I was thinking more like having a list of variables and clicking the ones you would want to reset to their default value (like the "reset global variables" action, but for only a couple of variables)

    I normally use functions for filtering global variable reset. I don't really think this is a need but if Ashley somehow makes a creative and interactive design for this feature for C3 then.... +1

    Could you go into a bit more detail on how you use functions?

  • The features suggested here sound an awful lot more complicated than just having a function call that copies the global variables you want to keep to local variables, does a "reset all", then copies the local variables back to globals. That is pretty straightforward if you only want to preserve a small number of global variables, which I assume is the case?

  • https://www.scirra.com/manual/149/function

    It seems as if you don't understand what Functions are, I would look into it, especially if you plan to start programming one day. Basically, EVERY action and condition in Construct 2 is a "function", although the Functions in C2 are just a tad different, they're functionally identical.

    Past learning how to use Functions, do what Ashley said.

  • > I normally use functions for filtering global variable reset. I don't really think this is a need but if Ashley somehow makes a creative and interactive design for this feature for C3 then.... +1

    >

    Could you go into a bit more detail on how you use functions?

    has the link to get you started.

    Ashley .... Yeah well some of us understand the complexity of it but can it be implemented for C3? I mean a better variable support for C3. It's kind of pointless making C3 if it's almost an exact copy of C2 in my opinion. Btw Ashley. Are you the only one making C3 or are there others? It looks like you are the only one doing all the work in my perspective....

  • UI is the hardest and most time consuming thing to implement, and this kind of feature sounds like it needs special dedicated UI, where you go through a giant list of all your global variables and enable/disable them or something. Considering there's what seems to be a pretty easy workaround, I'd rather not do difficult implementation work for something this minor. Our time is probably better spent on things people want more.

    We've announced several hires on our blog now, by the way.

  • Cough; behavior.

  • The features suggested here sound an awful lot more complicated than just having a function call that copies the global variables you want to keep to local variables, does a "reset all", then copies the local variables back to globals. That is pretty straightforward if you only want to preserve a small number of global variables, which I assume is the case?

    https://www.scirra.com/manual/149/function

    It seems as if you don't understand what Functions are, I would look into it, especially if you plan to start programming one day. Basically, EVERY action and condition in Construct 2 is a "function", although the Functions in C2 are just a tad different, they're functionally identical.

    Past learning how to use Functions, do what Ashley said.

    Oh, I haven't been using functions yet... I'll have to play with them a bit as they seem quite useful.

    Thanks for the replies!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • , This really is quite simple to work around. A day's worth of work to implement something isn't really that important as a basic engine feature.

    Though, making an expandable UI, that'd be an interesting way to go about that kind of issue. I doubt we will be seeing that with C3, but clearly there are a LOT of things that can be changed about C2 that probably will be. I'm sure it will be quite different.

    TRMG, That's alright. Construct 2 was made for that kind of purpose. What you're asking for is pretty commonly done easily in programming (well, not usually done, but easily done), it's just a matter of knowing how. Programming knowledge DOES go a long way with Construct 2, so I'd recommend you look into programming after you've finished your game or something. It really helps.

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