Moving multiple objects at one time
#6

First you need to set a timer to start moving the object from a-b like this maybe...

Код:
new testgate;

forward start(playerid);
public OnGameModeInit()//or public OnFilterscriptInit()
{
	testgate = CreateObject(3029,287.10000610,-29.5000,1000.5000,0.0000,0.0000,90.0000);
	SetTimer("start",2000,false);//Setting the timer to start moving the testgate to point b
	return 1;
}

forward test1(playerid);
public start(playerid)
{
	MoveObject(testgate, 1589.0000,-1638.2998,12.8000, 2);//Moving the testgate to point b
	SetTimer("test1",8000,false);//Object moves for eight seconds then executes the timer.
	return 1;
}

public test1(playerid)
{
	MoveObject(testgate, 1589.0000,-1638.2998,12.8000, 2);//Moving the testgate to point a
	SetTimer("test2",8000,false);//Object moves for eight seconds then executes the timer.
	return 1;
}

forward test2(playerid);
public start(playerid)
{
	MoveObject(testgate, 1589.0000,-1638.2998,12.8000, 2);//Moving the testgate to point b
	SetTimer("test1",8000,false);//Object moves for eight seconds then executes the timer.
	return 1;
}

public test2(playerid)
{
	MoveObject(testgate, 1589.0000,-1638.2998,12.8000, 2);//Moving the testgate to point a
	SetTimer("test1",8000,false);//Object moves for eight seconds then executes the timer.
	return 1;
}
Not sure if it will loop but I think so, also, i've just copied code from one of my scripts, so the objects, positions and timers should be set by you. Just determine the time it takes for the ferry to reach point b, then add the time you want the ferry to wait to that time.

I know it is 3 timers and you want one timer, but it is the best I can do ATM XD.

Hope I helped.
Reply


Messages In This Thread
Moving multiple objects at one time - by jeremy8810 - 06.09.2012, 19:14
Re: Moving multiple objects at one time - by Hyperfire - 06.09.2012, 20:09
Re: Moving multiple objects at one time - by jeremy8810 - 06.09.2012, 21:14
Re: Moving multiple objects at one time - by Hyperfire - 06.09.2012, 21:48
Re: Moving multiple objects at one time - by jeremy8810 - 07.09.2012, 06:10
Re: Moving multiple objects at one time - by Hyperfire - 08.09.2012, 18:29

Forum Jump:


Users browsing this thread: 2 Guest(s)