2013martin1212 Posted January 12, 2016 Share Posted January 12, 2016 Hello i try to create a script which is let me to move a boat to A to B position which is working fine , but i want that when the object was get that position then turn back and come back to the starting position but i dont have an idea how local x, y, z = 405.10000610352, -2130.3000488281, 17.200000762939, 0, 0, 180 local hajo = createObject( 8493, x, y, z, 0, 0, 180) --ID,X,Y,Z --tavolodo --local hajo2 = createObject( 8493, 405.10000610352, -2260.3000488281, 17.200000762939,0, 0, 180) --ID,X,Y,Z --tavolodo function indulas() moveObject(hajo, 15000, 405.10000610352, -2230.3000488281, 17.200000762939) -- when reach this position then make a 180 turn and come back to the starting position. end setTimer(indulas, 1000, 1, "") addCommandHandler("1", indulas) Link to comment
Castillo Posted January 12, 2016 Share Posted January 12, 2016 Use a timer to move the object back. Link to comment
2013martin1212 Posted January 12, 2016 Author Share Posted January 12, 2016 but how ? Link to comment
Castillo Posted January 12, 2016 Share Posted January 12, 2016 function indulas ( ) moveObject(hajo, 15000, 405.10000610352, -2230.3000488281, 17.200000762939) -- when reach this position then make a 180 turn and come back to the starting position. setTimer ( moveObject, 15100, 1, hajo, 15000, x, y, z ) end Link to comment
2013martin1212 Posted January 13, 2016 Author Share Posted January 13, 2016 Thanks its helps me a lot Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now