Local variables

New releases and general discussions.

Post » Wed Apr 15, 2009 8:23 pm

Variables local to the layout would be awesome. It would really help clear clutter from global variables and you could edit them during the edit time. They would be extremely useful.
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Wed Apr 15, 2009 8:26 pm

I want it too, Layout Variables will be useful and awesome :D
B
2
G
5
Posts: 17
Reputation: 1,284

Post » Wed Apr 15, 2009 8:30 pm

Do not want it. This is just another source of data (we have PVs, Hash Tables, Arrays, Global Variables at the moment, it's much enough). And it'll take some more ACE entries.
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Post » Wed Apr 15, 2009 9:04 pm

just use an invisible sprite, theres not really a need for this
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Wed Apr 15, 2009 9:23 pm

[quote="BROO":1wfrumk1]Do not want it. This is just another source of data (we have PVs, Hash Tables, Arrays, Global Variables at the moment, it's much enough). And it'll take some more ACE entries.[/quote:1wfrumk1]

You dont have to use them.Hash tables cannot be editied in the editime only in the runtime. But as for arrays you can edit data in the edit time but it would be easier to access a specific name variable.

[quote="QuaziGNRLnose":1wfrumk1]just use an invisible sprite, theres not really a need for this[/quote:1wfrumk1]

Invisible sprite will take up Vram and that is a waste of memory no matter how small it is. Why waste the Vram?
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Wed Apr 15, 2009 9:24 pm

1x1 sprite will only take 1 byte of VRAM. In theory.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Apr 15, 2009 9:29 pm

Yeah I tend to use small invisible sprites off the layout for holding variables (a single sprite with a small image will use a negligable amount of VRAM, don't worry about it). Layout variables would be a good idea, but it'd be complicated to add now. It'll probably have to wait till Construct 2.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Wed Apr 15, 2009 9:30 pm

I know it uses a negligible amount of Vram but why waste it when there is no need to?
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Wed Apr 15, 2009 9:33 pm

It still represents a decent solution till 2.0, for 1 byte of VRAM ;).
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Wed Apr 15, 2009 9:50 pm

Applying Local Variables mechanism would take much more memory than single small sprite Aeal, believe me.
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests