hide variables from sight

Get help using Construct 2

Post » Wed Sep 18, 2013 6:02 am

how do I hide variables so that they would not be seen when I use the "compare variable" condition or "set variable to" action? For example, I created global variables for controls, you know, keyboard numbers, so that I could change the numbers themselves in the options, or upgrade checking variables. Right now, I am not working with them, so I'd like to hide them so that there would be no tons of all the variables I don't need now when I choose a variable to compare/change. HOW I DU DIS
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Wed Sep 18, 2013 6:34 am

I don't believe there is a way to do it. Might be a cool feature though.
B
100
S
32
G
11
Posts: 1,552
Reputation: 21,612

Post » Wed Sep 18, 2013 11:24 am

Oh and,forgot to say, I don't want to use array positions as global variables. That's a whole Lotta trouble.
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Wed Sep 18, 2013 11:34 am

You can disable variables by moving them to an empty event sheet and then make sure that event sheet isn't 'included' on another event sheet. Sometimes I make an event sheet only for vars.
B
45
S
15
G
73
Posts: 2,019
Reputation: 43,420

Post » Wed Sep 18, 2013 11:35 am

It's pretty standard system to show all variables available in the current scope. I'd recommend you start using more local and instance variables, I rarely use any global variables as it's generally bad practice :)
B
24
S
9
G
7
Posts: 756
Reputation: 7,292

Post » Wed Sep 18, 2013 11:54 am

Yeah if you have problems like that use local variables instead of globals ...
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Thu Sep 19, 2013 8:33 am

But by disabling, you mean those variables won't basically work? Oh and @Darklinki , I will find out what local variables are, thanks.
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Thu Sep 19, 2013 9:15 am

The Fabulous Manual: Variables

I think this is really what you need, cause you see local variables only in their scope ;)
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Thu Sep 19, 2013 10:18 am

I think it could have been nice to have a button press when we are seeing all the available properties and variables when we have the drop-down list showing. i.e if I press shift while viewing it, only global variables are shown, or if I press ctrl, only instance variables are shown and if I press alt only properties are shown. etc.
B
17
S
4
G
1
Posts: 332
Reputation: 3,099

Post » Thu Sep 19, 2013 1:49 pm

@vee41

What's bad practice about it?spongehammer2013-09-19 13:49:37
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180

Next

Return to How do I....?

Who is online

Users browsing this forum: Alvaro2, Hadyurik and 9 guests