Opening looked door with a item.

callum_lockley
Hi in my game I was looking to have a room which can only be opened with using a key that the player would pick up in another room. However I am not sure how to do this so could someone please help me on how to do this.

OurJud
Here's a very simple example - two rooms, with a single exit back and forth. That exit is locked. Also in the room you have a key.

So, go to the 'exit' tab on the room with the locked door, click on the exit at the bottom where it says 'To' and 'Alias', then click 'Edit'.

Then make the UI look this this:

lockedroom.jpg


If you'd rather use code, click the tab I've highlighted and add this:

if (Got(key)) {
MoveObject (player, room 2)
}
else {
msg ("That door is locked")
}

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums