How do I

Get help using Construct 2

Post » Sat Dec 20, 2014 2:56 pm

how would you make a layer with HUD visbible or invisible hitting the same key ?
can somebody post a small capx ? I am sure it should be with else!...but still having problems :/

thanks 4 all the helping hands
B
37
S
16
G
2
Posts: 451
Reputation: 4,873

Post » Sat Dec 20, 2014 3:07 pm

The easiest way I've found to toggle anything on/off is by creating a variable and then use the following string to set it: Set variable to 1-variablename. What it does is if the variable is equal to 0 then 1-0=1 so it will switch it to 1. If the variable is 1 then 1-1=0 which switches it to 0.

So in your example.
On key pressed > Set variable HUD to 1-HUD

If variable HUD = 0 > Make objects invisible
else > Make Objects visible
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Sat Dec 20, 2014 3:59 pm

thanks a lot :)
B
37
S
16
G
2
Posts: 451
Reputation: 4,873

Post » Sat Dec 20, 2014 4:01 pm

This is how it's done
You do not have the required permissions to view the files attached to this post.
B
256
S
39
G
15
Posts: 1,982
Reputation: 41,032

Post » Sat Dec 20, 2014 5:34 pm

thank U :) !!!!!!!!!!!!!!!!!!!!!!!!!!
B
37
S
16
G
2
Posts: 451
Reputation: 4,873



Return to How do I....?

Who is online

Users browsing this forum: farfetchd83, Google [Bot], zenox98 and 15 guests