Layout Confirmation

Get help using Construct 2

Post » Fri Aug 22, 2014 1:23 pm

I wasn't sure how to put this sort of thing in the title so here goes :p

I'm making a platformer game were you need to collect a key to move onto the next level
and need a little bit of help, i'm not really sure how to check if I have the key or not so that it denies me
the right to move onto the next level until i've collected it. Any help is greatly appreciated! Thank you! :ugeek:
B
4
S
1
Posts: 20
Reputation: 370

Post » Fri Aug 22, 2014 1:31 pm

It is pretty simple. Just make a global variable named "key" and make it a bolean. Then you can do something like this

player collision with "key" set variable key to true and destroy key
system | compare variable | key is true? ----> Open door

IF you just want to compare the variable at a given time and not every tick you can set up a trigger. For example.

Player collision with door | compare variable | is "key" true? | If true, open door
B
58
S
25
G
14
Posts: 793
Reputation: 13,302

Post » Fri Aug 22, 2014 3:16 pm

Anonnymitet wrote:It is pretty simple. Just make a global variable named "key" and make it a bolean. Then you can do something like this

player collision with "key" set variable key to true and destroy key
system | compare variable | key is true? ----> Open door

IF you just want to compare the variable at a given time and not every tick you can set up a trigger. For example.

Player collision with door | compare variable | is "key" true? | If true, open door


Thank you, I have it working now thanks to you :mrgreen:
B
4
S
1
Posts: 20
Reputation: 370


Post » Fri Aug 22, 2014 4:45 pm

WombatPunch wrote:
Anonnymitet wrote:It is pretty simple. Just make a global variable named "key" and make it a bolean. Then you can do something like this

player collision with "key" set variable key to true and destroy key
system | compare variable | key is true? ----> Open door

IF you just want to compare the variable at a given time and not every tick you can set up a trigger. For example.

Player collision with door | compare variable | is "key" true? | If true, open door


Thank you, I have it working now thanks to you :mrgreen:


Awesome :D No problem. Good luck with your game :)
B
58
S
25
G
14
Posts: 793
Reputation: 13,302


Return to How do I....?

Who is online

Users browsing this forum: LunaticCat and 3 guests