0 Favourites

Layout Confirmation

  • 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!

  • 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

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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

  • Try this tutorial you will learn more keys, doors

    https://www.scirra.com/tutorials/806/instance-variable

  • > 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

    Awesome

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)