(Help) Need help with placing multiple exits and doors

Hello, I don't know much about Lua but I was trying to make multiple entrances to several doors in the same room and ran into a problem, the door connecting system was only allowing me to connect the door to a single room instead of connecting it to a door. this might be the only option but I do not want to redesign my entire game. The answer might be very simple but I don't know it. :playdate_cry_laugh:

Hi Ross! I think I understand that you want a door to teleport the player to another door in the same room? If so, you can do this with scripting. For example:

// run when the player moves
on update do
  // if player x is at x position of door
  if event.px==11 then
    // if player y is at y position of door
    if event.py==4 then
      // teleport the player to the second door position
      goto 3,6
    end
  end
end

Thanks for responding! @Benpai I am trying to connect a door to another door instead of just connecting it to a room so that I can have multiple entrances and exits in the same room but instead of selecting a specific door it only lets me select a room. Do you know how to do anything like that? Its probilly very easy but I am new to coding. Thanks!

I am trying to connect these two doors in separate rooms (the white background is hiding some arrows)

Ahh, sorry I misunderstood originally. You can definitely do that, it's not explained very well in the docs but when you select an exit, there's a little image of the room you connected it to on the side, you just have to click on this image where you want the exit to lead to.

Note the small yellow target that will show where the exit goes in the other room.

Thanks! I appreciate it!

1 Like