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

Get help using Construct 2

Post » Fri Sep 11, 2015 10:03 am

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 :roll:
B
3
Posts: 2
Reputation: 179

Post » Fri Sep 11, 2015 10:19 am

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Sep 11, 2015 11:28 am

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)
B
3
Posts: 2
Reputation: 179


Return to How do I....?

Who is online

Users browsing this forum: mekonbekon, yippiez and 11 guests