[suggestion] Global and Local variables in properties bar

Discussion and feedback on Construct 2

Post » Sun May 08, 2016 12:51 am

Hi,

Just think it would be very helpful to have a tab in properties bar with all global as well as local variables. Local would appear depending on events you are editing. I know you are working hard on c3, but would that thing be poss to add to c2? Thanks
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Sun May 08, 2016 2:28 am

I am not sure how this would help? Construct handles variables like any other IDE I have used for the most part. Some have the option of looking at different variable views, but never needed them (others might). Most of the dialogs work fine with auto-complete.

Just wondering what benefit it would give. I keep my functions super small, so I always can see all my local variables as I go. Only thing missing is global variables, but I have never ever found myself scrolling through my code to look at them.
B
43
S
18
G
8
Posts: 500
Reputation: 8,445

Post » Sun May 08, 2016 3:14 am

I think the auto-complete is fine for this. Beside, if you organize all those variables well, you should not have any trouble.

Can you provide a use case that might show the benefit of your suggestion?
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Post » Sun May 08, 2016 2:34 pm

TwinBlazar wrote:I think the auto-complete is fine for this. Beside, if you organize all those variables well, you should not have any trouble.

Can you provide a use case that might show the benefit of your suggestion?


Yes, when you are programming something with a lot of variables, creating lengthy events, it would be good to be able to quickly view and edit them, without the need to scroll back to where you keep them, and then scroll back down looking for the events you're working on. It's an unnecessary loop.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Sun May 08, 2016 4:02 pm

Why do you want to scroll back to where you keep them? You forgot their names?

For me, if I have lots of global variables to be used and referred to, I will just use Snipping Tool to snapshot all those global variables, place the snapshot on the left side of the screen and place C2 on the right side.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Post » Sun May 08, 2016 4:29 pm

TwinBlazar wrote:Why do you want to scroll back to where you keep them? You forgot their names?

For me, if I have lots of global variables to be used and referred to, I will just use Snipping Tool to snapshot all those global variables, place the snapshot on the left side of the screen and place C2 on the right side.


Yes, when you use 20 or 30 you might get confused. Snapshot would occupy too much space. I have laptop with 15" screen.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Sun May 08, 2016 7:51 pm

As a workaround, why not put all the global variables in their own separate event sheet and keep it open in a tab up top? Then it's just one click and they're right there for you.
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 205
Reputation: 3,468

Post » Sun May 08, 2016 8:59 pm

Why do you need them listed if you either choose them from a drop-down list or have them auto-completed as you type expressions?
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

Post » Sun May 08, 2016 11:03 pm

Ashley wrote:Why do you need them listed if you either choose them from a drop-down list or have them auto-completed as you type expressions?


They contain a lot of data, and its not easy to remember all of them. Many has similar names due to their function. I usually would use array, but I've learned that having variables with descriptive names is much easier to remember and speeds up workflow when creating sets of events, when doing maths for example using local variables, that are set in different events, and have random names like r or Num. Also, when you test, you'd want to be able to edit them faster then trough pop up.

Btw, that's something I was thinking of mentioning, to have in the future variables editable together with their names and type within the even sheet and not in pop up.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Sun May 08, 2016 11:47 pm

do you have an example capx? I cannot picture this. It sounds like you are not working at efficiently as possible, but perhaps I am mis-understanding the situation.
B
43
S
18
G
8
Posts: 500
Reputation: 8,445

Next

Return to Construct 2 General

Who is online

Users browsing this forum: sunisa2532, taker7 and 29 guests