I assume it's a bug, but if not, it's still something that's caused me more than a few headaches when testing my dungeon until I figured out what keys to sometimes work and sometimes just get tossed at the door, and I'd love to hear how to solve it!antti wrote:Yeah, add a script entity and refer to the door with its ID. For example, if you would want to open a with the ID of dungeon_door_wooden_locked_1 with an iron key, you could add the following line to a script entity:Code: Select all
dungeon_door_wooden_locked_1:setOpenedBy("iron_key")
Here's how to reproduce it:
- Put a dungeon_door_wooden_locked in your dungeon.
- Put a key nearby.
- Place a script_entity in your dungeon and write in it the above quoted code snippet (adjust if needed so your key and door match)
- Export the map and load it through the custom dungeon menu.
- Quicksave the game, then load the quicksave.
- The key will now no longer open the door.
It seems like the setOpenedBy operates on a local variable.
