18.08.2008, 13:59
Quote:
Originally Posted by Farly
Hmm wont this just keep the gate closed all of the time because someone in the server is not going to be in that area, so the gate will close.
|
i have done this:
Код:
if((X <= 1541.5036 && X >= 1530.1136 && Y <= -1436.6630 && Y >= -1464.1524) || (X <= 1561.2152 && X >= 1504.2138 && Y <= -1430.9941 && Y >= -1450.5169)) { { MoveObject(GPRHQTor,1534.51,-1451.48,20,3); } } else if((!(X <= 1541.5036 && X >= 1530.1136 && Y <= -1436.6630 && Y >= -1464.1524)) || (!(X <= 1561.2152 && X >= 1504.2138 && Y <= -1430.9941 && Y >= -1450.5169))) { MoveObject(GPRHQTor,1534.51,-1451.48,14.7531,3); }
the first if checks if the player is in the area
and the else if checks if he is not in the area
the two if's has two area checks, cause my script checks an area like this:
__________
|____ __|
| |
|__|