Boolean Instance Variable Not Working

Get help using Construct 2

Post » Fri Jan 24, 2014 1:19 am

Trying to change the position of a Dropdown Box object by pressing B. I've implemented a Boolean instance variable for the dropdown box, but it isn't working. .capx is commented, and help would be greatly appreciated!

Thanks!

https://www.dropbox.com/s/xeivbcsmgzytrfr/zombie.capx
B
22
S
4
G
1
Posts: 153
Reputation: 1,938

Post » Fri Jan 24, 2014 1:41 am

fix
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Fri Jan 24, 2014 6:07 am

@blackhornet
Thanks for the quick fix. What was the problem?
B
22
S
4
G
1
Posts: 153
Reputation: 1,938

Post » Fri Jan 24, 2014 6:22 am

You have to step through the logic. You had On B->Activated = True, followed by (On B AND Activated=True)->Activated = False. Both of those Triggers are going to be processed, in order, cancelling each other out. By having a single trigger check, you can then decide how to process it based on the Activated state.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Fri Jan 24, 2014 7:36 am

I would choose to replace it with on B pressed - toggle boolean.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, ignaciosimo and 28 guests