[How-To] Make an Automatic Gate
#7

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.
yes, i have written a clan script and if someone of the clan is connected an not in the area, the gate won't open.
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);
    }
this works

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:

__________
|____ __|
| |
|__|
Reply


Messages In This Thread
[How-To] Make an Automatic Gate - by Giacomand - 24.05.2008, 18:14
Re: [How-To] Make an Automatic Gate - by Lewwy - 24.05.2008, 18:16
Re: [How-To] Make an Automatic Gate - by Giacomand - 25.05.2008, 10:23
Re: [How-To] Make an Automatic Gate - by Carlos_Leone - 03.06.2008, 12:34
Re: [How-To] Make an Automatic Gate - by GiP_YossI - 12.07.2008, 20:25
Re: [How-To] Make an Automatic Gate - by camil - 20.07.2008, 09:38
Re: [How-To] Make an Automatic Gate - by Lapside - 18.08.2008, 13:59
Re: [How-To] Make an Automatic Gate - by djc508 - 21.08.2008, 17:21
Re: [How-To] Make an Automatic Gate - by silvan - 26.08.2008, 11:35
Re: [How-To] Make an Automatic Gate - by mamorunl - 26.08.2008, 12:17

Forum Jump:


Users browsing this thread: 1 Guest(s)