Using keys and doors

Knowledgebase / Using keys and doors

keys   doors

Doors from the Gamefroot Classic Pack have a Door script attached to them which block the player from getting past, unless the player has collected a key to unlock them.

To change its properties, right-click on it and select Instance Properties.
door-properties
These are the properties you can change on a door:
  • My tag: the tag that the key uses to unlock this door (default is door). If you want to have a door that can only be opened by a special key, then change this tag so it corresponds with the tag on that key (see the Key section below).
  • Player tag: the door can only be opened by the character (object) that has this tag (default is player).
  • Flipped: set this to true to flip the door horizontally.

Keys from the Gamefroot Classic Pack have a Key script attached to them which allows the player to unlock doors if the player has collected the key.

To change its properties, right-click on it and select Instance Properties.
key-properties
These are the properties you can change on a key:
  • Player tag: the door can only be opened by the object that has this tag (default is player).
  • Door tag: doors that can be unlocked by this key will use this tag (default is door). If you want to have a door that can only be opened by this key, then change this tag and make sure the corresponding door uses the same tag.