Add a coordinate check, like
if (ycoordinate == x) {
teleport or walk somewhere
} else {
teleport or walk somewhere else
}
|
I feel like an idiot asking this, I'm trying to add the door for corp beast to go both ways. I don't know how to do it both ways, my current code
Any help will be appreciated.case 677:
player.getPA().movePlayer1(2974, 4385);
player.objectDistance = 2;
break;
Add a coordinate check, like
if (ycoordinate == x) {
teleport or walk somewhere
} else {
teleport or walk somewhere else
}
This should work, Dont use these coords.
Explanation:Code:case GATEID: if (c.absX == 3240 && c.absY == 9364) { c.getPA().movePlayer(3242, 9364, 0); c.sendMessage("Prepare for the strongest Boss in (SERVER NAME)"); } else { c.getPA().movePlayer(3240, 9364, 0); } break;
if (c.absX == 3240 && c.absY == 9364) { // If you are these coords
c.getPA().movePlayer(3242, 9364, 0); //Teleport player here. 0 is the height just in case you were wondering.
} else { // if you are not at those coords (other side of that gate)
c.getPA().movePlayer(3240, 9364, 0); //move player back out
}
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |