0 Favourites

How do I make 20 buttons for doors, traps, elevators

  • I 'am a making a small RPG game like Zelda style in space. Need a button for multiple doors on level one, but to trigger only curent door like :

    1.Player is in room 1 with 2 doors how to make only one door button enabled, when push a button only one door in level are opening. How to do that?

    On one layer-level I will make a 20-30 doors,traps etc

    Doors have 1 switch and red and green state. red closed, green open, leter i will add onother state like passlocked door blue... etc

    1. Making door 1, door 2... switch 1,2,3 is not solution.

    2. Making only switch who activated when player is on like pad-area (invisible area on front of the door)

    but how to make to switch only current door.

    3. later I will use cards and keys for hacking dors etc. computers and robots

  • I'm not sure I understand the problem..

    There are so many ways to do this.

    Putting the door and the switch in a container would be my first option.

    You could also use instance variables and give the door and the switch the same variable so on switch clicked check if switch.variable = door.variable..

    Also setteng a variable on either the switch or the door to the UID of the other and checking that would be an option.

    Maybe in your case you could use pick nearest door when using the switch..

    A lot of it depends on what you are comfortable with..

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Made it, thank you, for quick answer!

    1. Set sprite Door variable doorID

    2. Set sprite Switch variable targetDoor

    3. Sytem>pick Door where Door.doorID=Switch.targetDoor

    4. Set anim for Door opening, set switch frame to 1 (green)

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