[Suggestion] Toggle Boleans

Discussion and feedback on Construct 2

Post » Mon Jul 29, 2013 9:03 pm

Hi, could we have a Toogle state for every boolean type of action/event?
Toogle Pause/Play for audio for example would be very helpful.

Thanks
B
38
S
8
G
3
Posts: 439
Reputation: 6,876

Post » Tue Jul 30, 2013 7:52 am

Hi. You could try to use a global variable as kind of switch maybe?
If the var is set to 0 (false) music stops, if it is set to 1 music plays. But I did not try this, yet. Just an idea that could work.
B
51
S
15
G
6
Posts: 682
Reputation: 8,911

Post » Tue Jul 30, 2013 1:23 pm

@Bl4ckSh33p thank you for the answer fellow sheep ;D
Ill try to use that for now! ;]
B
38
S
8
G
3
Posts: 439
Reputation: 6,876

Post » Tue Jul 30, 2013 2:24 pm

Try this:

var = 1 - var

it will toggle between 0 and 1

E.g:

Var = 0
var = 1 - 0 = 1

var = 1
var = 1 - 1 = 0

Hope that helps. :)
B
72
S
25
G
9
Posts: 383
Reputation: 10,661


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests