Damn door I demand you to listen.....
I'm thinking this might make it
under your firstclick object void usually called
Code:
ObjectClick(), ObjectClick1(), ClickObject(), ect..
or yours all might just be under case 132:
anyways, add this little bit of coding with the rest of your objects
messing around with the 0 at the end of the void will change its face direction
Code:
case objectID here:
changeDoor(objectId, objectX, objectY, 0);
break;
changeDoor void from Palidino's battlescape server.
Code:
public void changeDoor(int objectId, int objectX, int objectY, int faceId)
{
for (int i = 1; i < Server.s.playerHandler.maxPlayers; i++)
{
client p = (client) Server.s.playerHandler.players[i];
if (p != null)
{
if (WithinDistance(objectX, objectY, p.absX, p.absY, 60))
{
p.replaceObject(objectX, objectY, -1, -1);
p.replaceObject2(objectX, objectY, objectId, faceId, 0);
}
}
}
}
public void replaceObject(int objectX, int objectY, int NewObjectID, int Face) {
outStream.createFrame(85);
outStream.writeByteC(objectY - (mapRegionY * 8));
outStream.writeByteC(objectX - (mapRegionX * 8));
outStream.createFrame(101);
outStream.writeByteC(0);
outStream.writeByte(0);
if (NewObjectID != -1)
{
outStream.createFrame(151);
outStream.writeByteS(0);
outStream.writeWordBigEndian(NewObjectID);
outStream.writeByteA(Face);
}
}
public void replaceObject2(int objectX, int objectY, int NewObjectID, int Face, int ObjectType)
{
outStream.createFrame(85);
outStream.writeByteC(objectY - (mapRegionY * 8));
outStream.writeByteC(objectX - (mapRegionX * 8));
outStream.createFrame(101);
outStream.writeByteC((ObjectType<<2) + (Face&3));
outStream.writeByte(0);
if (NewObjectID != -1)
{
outStream.createFrame(151);
outStream.writeByteS(0);
outStream.writeWordBigEndian(NewObjectID);
outStream.writeByteS((ObjectType<<2) + (Face&3));
//FACE: 0= WEST | -1 = NORTH | -2 = EAST | -3 = SOUTH
//ObjectType: 0-3 wall objects, 4-8 wall decoration, 9: diag. walls, 10-11 world objects, 12-21: roofs, 22: floor decoration
}
}
I included both replace objects incase you don't have them.