Global Variables: Booleans?

Discussion and feedback on Construct 2

Post » Wed Aug 01, 2012 4:50 am

Me too. I use "true/false" strings or 0 or 1 as a substitute, but it's still not the most convenient method, especially when employers actually look at my code...
B
19
S
5
G
1
Posts: 104
Reputation: 2,920

Post » Wed Aug 01, 2012 4:05 pm

if you do get around to adding global bools please also add an option to set the value of the bool not just toggle it. The toggle is useful no doubt but Id like the ability to set the value directly as well. Same for instance bools. I dont use those at all simply because I cant set the value
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Wed Aug 01, 2012 4:09 pm

@aridale, you can set the value of instance booleans. They would be pretty usless for most situations if you could only toggle.Nimtrix2012-08-01 16:11:09
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Aug 01, 2012 4:11 pm

is that new? I just checked in r99 and theres is a set boolean but I swear Ive never seen it before... only toggle
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Wed Aug 01, 2012 4:12 pm

[QUOTE=aridale] if you do get around to adding global bools please also add an option to set the value of the bool not just toggle it. The toggle is useful no doubt but Id like the ability to set the value directly as well. Same for instance bools. I dont use those at all simply because I cant set the value[/QUOTE]
But there is a Set Boolean event already.
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Wed Aug 01, 2012 4:13 pm

@aridale:
It's been there as long as I've used C2, so at least since december.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Aug 01, 2012 4:16 pm

ohh in that case...


lol
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Wed Aug 01, 2012 4:22 pm

@aridale: Haha, well done for never spotting it. You'd think it would appear in an example you had a look at or something at some point.

I use booleans all the time myself, but numbers work fine, so of course it doesn't really matter.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Aug 01, 2012 4:25 pm

I dont think Ive ever looked at a c2 example... Not past the ghost killer tutorial thing lol
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Wed Aug 01, 2012 4:33 pm

@aridale: Not even other people's .capx examples? There are many great ideas and game mechanics floating around in these forums.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: Silverforce, Unconnected, Zebbi and 11 guests