moving objects
#1

i have created this :
pawn Код:
Side = CreateObject(975, -1734.655151, 28.273335, 4.204377, 0.0000, 0.0000, 90.0000);
    Front1 = CreateObject(980, -1675.952881, 9.499218, 5.328079, 0.0000, 0.0000, 135.0000);
    Front2 = CreateObject(980, -1667.801880, 1.350600, 5.328079, 0.0000, 0.0000, 135.0000);
    Front3 = CreateObject(980, -1659.689209, -6.770653, 5.322875, 0.0000, 0.0000, 135.0000);

    SetTimer("...", 60000, 0); // called "public ...(playerid)"

public ...(playerid)
{
    SetPlayerCheckpoint(playerid, -1539.262817, 133.987518, 2.613937, 8);
    SendClientMessageToAll(YELLOW, "...");
    SetTimer("GatesOpen", 8000, 0);
    return 1;
}

public GatesOpen()
{
    MoveObject(Side,-1734.655518,37.611305,4.204377,3);
    MoveObject(Front1,-1675.952881,9.499218,5.328070,3);
    MoveObject(Front2,-1667.801880,1.350600,5.328070,3);
    MoveObject(Front3,-1659.689209,-6.770653,5.322866,3);
    return 1;
}

public GatesClose()
{
    MoveObject(Side,-1734.655518,28.273335,4.204377,3);
    MoveObject(Front1,-1675.952881,9.499218,5.328079,3);
    MoveObject(Front2,-1667.801880,1.350600,5.328079,3);
    MoveObject(Front3,-1659.689209,-6.770653,5.322875,3);
    return 1;
}
but the gates dont moving somebody knows?

Edit: public GatesClose called on other place in script
Reply
#2

sorry but i realy need help ... i created it exactly like my other gates but it dont work
Reply
#3

please can someone help?
Reply
#4

You have the exact same coordinates for the gates (apart from Side) when you open/close them so they won't move.
Reply
#5

you need open and closed coords...



so

createobject(closedcoords)

moveobject(opencoord)

sometime later

moveobject(closedcoords)
Reply
#6

look at my code...
the first part is the object(closed)
then come the moveobjects they open this objects
and then come they closed this objects
Quote:
Originally Posted by On_Top_Non_Stop
You have the exact same coordinates for the gates (apart from Side) when you open/close them so they won't move.
no you have to look they are not the same
Reply
#7

Look at GatesOpen and GatesClose.

pawn Код:
public GatesClose()
{
    MoveObject(Side,-1734.655518,28.273335,4.204377,3);//These coords are different
    MoveObject(Front1,-1675.952881,9.499218,5.328079,3);//but these
    MoveObject(Front2,-1667.801880,1.350600,5.328079,3);//and these
    MoveObject(Front3,-1659.689209,-6.770653,5.322875,3);//even theses are the same as the open position.
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)