Boolean global and local variables?

Discussion and feedback on Construct 2

Post » Fri Nov 25, 2011 9:11 am

When creating new global or local variable there is no an option to create a variable of Boolean type!

I wonder why because now for checking true/false state I must use variables of Number type?
B
9
S
2
G
5
Posts: 26
Reputation: 3,219

Post » Fri Nov 25, 2011 10:03 am

What C2 version you have, it's there. For locals only, but I'm not sure you could ever choose boolean for globals.

edit> Ah, I mixed up locals with instance variablesNoga2011-11-25 12:42:22
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Fri Nov 25, 2011 10:39 am

I have r68 version.

There is no Boolean type option for both global and local variables.

But interesting, you can choose Boolean for an instance variable of an object!
B
9
S
2
G
5
Posts: 26
Reputation: 3,219

Post » Fri Nov 25, 2011 10:52 am

I would say this is in the wrong section. This section is for reporting actual bugs in the program, not missing features.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,850
Reputation: 48,301

Post » Fri Nov 25, 2011 4:48 pm

@zenox98 is right, moved to Construct 2 general.

It's an oversight from when I made event variables - you can use an integer (0 or 1) for now which is an easy workaround though. Adding this is on the todo list.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Fri Nov 25, 2011 6:11 pm

I was going to post about this topic as well. I think that global booleans would be a good idea. Using an int can be problematic.
B
69
S
11
G
6
Posts: 324
Reputation: 8,321

Post » Fri Nov 25, 2011 6:39 pm

Also I should point out that you will probably need to have the global boolean down the road. Eventually you will need to have it in order to make more complex games.
B
69
S
11
G
6
Posts: 324
Reputation: 8,321

Post » Fri Nov 25, 2011 8:03 pm

Yes, I'm using 0 and 1 for now, but Boolean would be better for checking true/false state as mammoth said. Anyway thanks for fixing this in the next version!

Next time I will post these things in Construct 2 General.
B
9
S
2
G
5
Posts: 26
Reputation: 3,219

Post » Sat Nov 26, 2011 4:58 am

While we are on the topic of booleans can we have a compare boolean like the compare variable.

For example

If Boolean is true then....
If Boolean is false then....

I think this would be usefull
B
69
S
11
G
6
Posts: 324
Reputation: 8,321

Post » Tue Feb 26, 2013 9:58 pm

I'd like to remind you about the boolean variables. Please, with r119 they are still not there... and would be sooo nice to have them.
B
11
S
3
G
3
Posts: 79
Reputation: 3,343

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests