Making a moving ship.
#1

So i have a queston about moveobject and using it to move a ship. I was just wondering if it was possible to take 6 objects....
PHP код:
    shipa CreateObject(9585, -1024.33, -282.617.56,   0.000.0097.62);
    
shipb CreateObject(9586, -1023.86, -284.7517.64,   0.000.0097.62);
    
shipc CreateObject(9584, -1014.37, -356.6826.62,   0.000.0097.62);
    
shipd CreateObject(9590, -1025.17, -279.319.25,   0.000.0097.62);
    
shipe CreateObject(9761, -1024.14, -283.7327.44,   0.000.0097.62);
    
shipf CreateObject(9698, -1014.68, -344.7829.51,   0.000.0097.62); 
...Them 6, and make it into one identifyer for the ease of making the ship move as a whole instead of making 6 seperate moveobject, cause at the moment its not working out too good. I made the ship in samp map editor so its close enough to perfect for me. I am new to scripting and at the moment using a premade moving ship script and using it to learn how to make my own.
And my other question is how would i make a constant route with the ship and no stops, i know how to use setobjectrot, but just wondering what i would have to do to make it keep going.
Thanks
Nick
Reply
#2

I know how, you need use moveobject https://sampwiki.blast.hk/wiki/MoveObject and enter the coordenates to where you want and make a timer if the object in that coordenates then move the ship in other place, if you give more information about your idea then I can help you out
Reply
#3

pawn Код:
#define MAX_SHIP_OBJECTS 7 // 6+1

new shipobject[MAX_SHIP_OBJECTS];

shipobject[0] = CreateObject(9585, -1024.33, -282.61, 7.56,   0.00, 0.00, 97.62);
shipobject[1] = CreateObjec...

And to move the objects:

for(new i=0; i<MAX_SHIP_OBJECTS;i++)
{
     MoveObject(shipobject[i], ...);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)