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

Discussion and feedback on Construct 2

Post » Mon Nov 14, 2016 8:37 pm

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
Last edited by TRMG on Tue Nov 15, 2016 9:27 pm, edited 1 time in total.
ImageImageImageImage
B
27
S
9
G
7
Posts: 229
Reputation: 5,493

Post » Mon Nov 14, 2016 9:11 pm

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
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
55
S
17
G
90
Posts: 1,112
Reputation: 59,147

Post » Mon Nov 14, 2016 9:14 pm

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?
Image ImageImage
B
168
S
50
G
164
Posts: 8,227
Reputation: 105,573

Post » Tue Nov 15, 2016 12:06 am

newt wrote: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.
ImageImageImageImage
B
56
S
21
G
77
Posts: 636
Reputation: 43,961

Post » Tue Nov 15, 2016 7:40 am

newt wrote: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?

TheRealDannyyy wrote:
newt wrote: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)

chadorireborn wrote: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?
ImageImageImageImage
B
27
S
9
G
7
Posts: 229
Reputation: 5,493

Post » Tue Nov 15, 2016 12:05 pm

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?
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,250

Post » Tue Nov 15, 2016 1:00 pm

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.
ImageImage
B
44
S
13
G
2
Posts: 252
Reputation: 6,246

Post » Tue Nov 15, 2016 4:16 pm

TRMG wrote:
chadorireborn wrote: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?


@KTML5 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....
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
55
S
17
G
90
Posts: 1,112
Reputation: 59,147

Post » Tue Nov 15, 2016 4:35 pm

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.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,250

Post » Tue Nov 15, 2016 5:01 pm

Cough; behavior.
Image ImageImage
B
168
S
50
G
164
Posts: 8,227
Reputation: 105,573

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Brendan2007, Yahoo [Bot] and 7 guests