How do I make the cave?

0 favourites
  • 3 posts
From the Asset Store
1.200+ 16x16 pixelart tiles with animated tiles for your game!
  • I have a cave in my TDS game, and it's have more than one entrance. How can I make it so that when entering a cave, the player appears near the corresponding entrance, and not in another place? That is, to be able to enter a cave at one end of the map, go through it and exit at the other end (entrance and exit were made using "Go to Layout")?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create invisibly doors in all the entrances and add an instance variable "Door_Number" then set each door with its own unique number: 1,2,3, etc...

    Supposing that the Cave is in a separate layout:

    You need to repeat the same process and create all the invisible doors with the same "Door_Number" unique number: 1,2,3, etc...That you set it up above.

    1-Then on colliding with any door to enter the cave save the "Door_Number" in a global variable, Array, Dictionary, or whatever method you like.

    2-On Cave Layout:

    -At the start of the layout:

    ----------Door.Door_Number = Global Var "Door_Number": ---------Action:Set Character Position to DoorX,Y

  • Thank you very much!!!

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