doodle/dev-assets/doodads/doors/keys.js
Noah Petherbridge b4922edf5d Doodad Tool: Add Tag Support for edit-doodad
* The `doodad edit-doodad` command now allows setting custom key/value
  tags in doodad files, for extra data storage useful to their scripts.
* Colored keys and doors now store a `color` tag with the appropriate
  color so that their scripts don't have to parse their Title to find
  that information.
* Trapdoors now store a `direction` tag to hold the direction the door
  is facing.
2020-01-02 22:12:20 -08:00

9 lines
157 B
JavaScript

function main() {
var color = Self.Doodad.Tag("color");
Events.OnCollide(function(e) {
e.Actor.SetData("key:" + color, "true");
Self.Destroy();
})
}