Need help fast!
#1

How would I make it so that when a gate closes, the other one opens?
Reply
#2

pawn Код:
public OnObjectMoved()
{
//code here
}
Reply
#3

godamn it he beat me xD
Reply
#4

How would I make this on a 20 second timer? Like 20 seconds, then the gate closes and the other one opens. And backwards..
Reply
#5

Quote:
Originally Posted by Lolrofl
Посмотреть сообщение
godamn it he beat me xD
LOL too slow xPPP

Now back on topic: You would move the 1st gate somewhere else in your script, then do this:
pawn Код:
public OnObjectMoved(playerid,objectid)
{
    if(objectid==gate1 || objectid==gate2)
    {
        SetTimerEx("move",20000,1,"i",objectid);
    }
    return 1;
}

forward move(objectid);
public move(objectid)
{
    if(objectid==gate1)
    {
        MoveObject(gate2,blah blah blah);
    }
    else if(objectid=gate2)
    {
        MoveObject(gate1, blah blah blah);
    }
    return 1;
}
It will do that until you kill the timer.
Reply
#6

Thanks! It works!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)