moveobject with timer plz help me :| -
noamch1997 - 16.08.2014
I want to make my object to move with timer from:
X1,Y1,Z1 -->X2,Y2,Y3-->X3,Y3,Z3-->X4,Y4,Z4-->X5,Y5,Z5-->X6,Y6,Z6 .
with timer .. I want to make this move , to move over and over again without stop (when player near the object - somthing like 30.000)
the object X,Y,Z :
X1Y1Z1 -
http://prntscr.com/4dbnpz
X2Y2Z2 -
http://prntscr.com/4dbnvs
X3Y3Z3 -
http://prntscr.com/4dboii
X4Y4Z4 -
http://prntscr.com/4dbolm
X5Y5Z5 -
http://prntscr.com/4dbodl
X6Y6Z6 -
http://prntscr.com/4dboom
I dont know how to make it..someone can help me plz ? I will +REP
tnx very much !!!!!!!!!!!!!
Re: moveobject with timer plz help me :| -
Lofti - 16.08.2014
Have you tried using settimer and killtimer for every object's coordinates? Im gueesing you want to make the spawnings random not in the same order everytime.
Re: moveobject with timer plz help me :| -
MicroD - 16.08.2014
I can give you idea because I have no time to code it for you.
So you want to check if a player is close to your object at a given distance by using snippet or what ever to check it. After that you create object at the initial spot and if player is close give it some movement (
https://sampwiki.blast.hk/wiki/MoveObject ) after object is moved to X2Y2Z2 it will call his mother (
https://sampwiki.blast.hk/wiki/OnObjectMoved) and tell her that he's done. Inside OnObjectMoved you want to create a check if it's the object you're moving and if it is make switch function which will go through states of object movement which you can control by creating a simple variable named "state" or what ever. And that's pretty much it once it get sto the last case 5: you put state variable back to 0. That's what came onto my mind when I saw this, there might be a bit easier way?
Re: moveobject with timer plz help me :| -
Virtual1ty - 16.08.2014
Check out the pirateship.pwn that comes with the SA: MP server on how to do this. Use OnObjectMoved to set next point, or stop the object/kill the timer or reset. Good luck!
Re: moveobject with timer plz help me :| -
noamch1997 - 16.08.2014
Quote:
Originally Posted by Lofti
Have you tried using settimer and killtimer for every object's coordinates? Im gueesing you want to make the spawnings random not in the same order everytime.
|
Quote:
Originally Posted by MicroD
I can give you idea because I have no time to code it for you.
So you want to check if a player is close to your object at a given distance by using snippet or what ever to check it. After that you create object at the initial spot and if player is close give it some movement ( https://sampwiki.blast.hk/wiki/MoveObject ) after object is moved to X2Y2Z2 it will call his mother ( https://sampwiki.blast.hk/wiki/OnObjectMoved) and tell her that he's done. Inside OnObjectMoved you want to create a check if it's the object you're moving and if it is make switch function which will go through states of object movement which you can control by creating a simple variable named "state" or what ever. And that's pretty much it once it get sto the last case 5: you put state variable back to 0. That's what came onto my mind when I saw this, there might be a bit easier way?
|
Quote:
Originally Posted by Virtual1ty
Check out the pirateship.pwn that comes with the SA: MP server on how to do this. Use OnObjectMoved to set next point, or stop the object/kill the timer or reset. Good luck!
|
I am beginner in Pawn and I dont know how to write it .. please someone may code it for me ? its very simple to you

plz plz !!!
tnx !
Re: moveobject with timer plz help me :| -
noamch1997 - 16.08.2014
someone ? plz ? I wil rep you
Re: moveobject with timer plz help me :| -
noamch1997 - 17.08.2014
plz someone ! just example for me
Re: moveobject with timer plz help me :| -
noamch1997 - 17.08.2014
plz someone ! just example for me
Re: moveobject with timer plz help me :| -
noamch1997 - 18.08.2014
someone ?
Re: moveobject with timer plz help me :| -
noamch1997 - 19.08.2014
it easey for you .. why nobody can give me an example ? i just want to learn