From Matrix's ObjectHandler:
That 0/1 is rotation.Code:Logger.log( "ObjectHandler", "examined object id : " + object.getId() + ", " + object.getX() + ", " + object.getY() + ", " + object.getPlane() + ", " + object.getType() + ", " + object.getRotation() + ", " + object.getDefinitions().name);
The easiest way to handle doors would be to spawn a temporary door object (World.spawnTemporaryObject I think ?) on top of the existing door with a rotation of (rot + 1). Very simple solution, but it has drawbacks. For example, if you decide to apply that code to all the objects that have "Door" in their name and "Open" in their option, you will run into special cases where this does not apply. For example, the option could be "unlock" instead of "open", or the id of the opened door could be different from the closed one. This is probably the best solution if you're new to this.
The proper way to do this would probably be to have a data structure where you add door ids as you implement them (door by door), along with some config. For example:
So anyway, for the 1st solution it would be something like this in ObjectHandler:Code:[ { doorId: 1, x: 2500, // could store x/y/z in one int, using them for demonstration purposes y: 2500, z: 0, toDoorId: 2, closedAfter: true, // for doors that close after the player goes throught like gnome stronghold. etc... } ]
Code:if (object.getDefinitions().getName.toLowerCase().contains("door") && object.getDefinitions().containsOption("Open")) { World.spawnTemporaryObject(new WorldObject(object.getId(), object.getType(), object.getRotation() + 1)); }






