Auto moving objects
#1

So i have this when player pick pickup objects move.I wanna know how make when server start objects auto-move on one side and than come back?
Reply
#2

Use SetTimer function, and check the objects' position. If they are at the first coords, move them to the second, else move them back to the start position.
Reply
#3

I was tryed everything before few days but didnt work
Can i get it from someone?
Reply
#4

look at scripts with moving objects....................................
Reply
#5

I sayd i didnt found ..^
Reply
#6

Get the coords of the objects, and the coords of the places where you want to move them, and i'll make it for you.
Reply
#7

k i will post like "create object"
Quote:

CreateObject(3115, 834.58679199219, -2077.3247070313, 11.756024360657, 0, 0, 0);
CreateObject(3115, 834.35845947266, -2116.4672851563, 5.5060243606567, 0, 0, 0);

Reply
#8

The 1st object moves to the 2nd object's position, and the 2nd to the 1st's position:

http://pastebin.com/SJxcngJn

I hope you wanted this.
Reply
#9

Nonameman tnx on spending time but that dont work for me.Objects dont move
Reply
#10

pawn Код:
// global
new
    obj,
    bool:at_start;

// OnGameModeInit
obj = CreateObject(model, start_x, start_y..............
MoveObject(obj, new_x, new_y,...........

// OnObjectMove // or moved ?
if (objectid == obj)
{
    if (!at_start) MoveObject(obj, start_x, start_y, start_z, speed);
    else MoveObject(obj, new_x, new_y, new_z, speed);
    at_start = !at_start;
}
That would move back and forth repeatedly as the callback gets fired when an object stops moving.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)