How do I set Boolean Variable to TRUE?

Get help using Construct 2

Post » Fri Aug 05, 2016 9:49 am

I seem to be overlooking something.

When I set a Boolean Variable to true and click OK, it automatically changes to '<varies>'. What does this mean? I want true!

Thanks in advance :)

EDIT: OH BTW it's an instance variable.
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Fri Aug 05, 2016 10:03 am

Varies in this case means that you have a default value for the instance variable (likely "False") that you can check by selecting the Object Type that contains the variable directly in the Object Type folder of the project's bar and you have an instance of that object type which instance variable's value is set to "True", resulting in the fact that the defaulting value in turns "varies" in your edittime configuration.

Just make sure to select the instance, the value set for the instance will stick to it, or at worst, in your event sheet, on start of layout, do some initialisation and set the instance boolean variable's value to True. All instances of your object type will have their instance variable value set to true, but it should do the trick.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Fri Aug 05, 2016 10:09 am

Kyatric wrote:Varies in this case means that you have a default value for the instance variable (likely "False") that you can check by selecting the Object Type that contains the variable directly in the Object Type folder of the project's bar and you have an instance of that object type which instance variable's value is set to "True", resulting in the fact that the defaulting value in turns "varies" in your edittime configuration.

Just make sure to select the instance, the value set for the instance will stick to it, or at worst, in your event sheet, on start of layout, do some initialisation and set the instance boolean variable's value to True. All instances of your object type will have their instance variable value set to true, but it should do the trick.


Legend! Works like a charm. I understand now, thanks Kyatric :)
B
24
S
10
G
1
Posts: 153
Reputation: 2,660


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests