DonPro Posted June 21, 2015 Posted June 21, 2015 Hi, this is a timer that have been set, but they object start go faster, and sometimes slower. and i have tryed everything to make it go in the same speed but it does not work at all. could you help me and show me whats wrong with it? local moveTable = { --{time, x, y, z, rotX, rotY, rotZ}, {10000, 2896.19, -2397.39, 3.70}, {80000, 2896.19, -2762.60, 3.70}, {35000, 2854, -2874.60, 3.70}, {125000, 1162.09, -2874.60, 3.70}, {210000, 880.70, -2146.5, 3.70}, {270000, 880.70, -1884.09, 3.70}, } function move() for k,v in ipairs(moveTable) do if k == 1 then moveObject(object1, unpack(v)) else local time = 0 if k ~= 2 then for i=1,k-1 do time = time + moveTable[i][1] end else time = moveTable[1][1] end outputChatBox(time) setTimer(moveObject,time,1,object1, unpack(v)) end end end function moveGate(playerSource, cmd) move() end addCommandHandler("gostart", moveGate)
DonPro Posted June 21, 2015 Author Posted June 21, 2015 Simply use the same timer. could you show me what you mean? i was looking at Wiki, but i didnt understand that lol
Walid Posted June 21, 2015 Posted June 21, 2015 Simply use the same timer. could you show me what you mean? i was looking at Wiki, but i didnt understand that lol change the timer in your "moveTable".
DonPro Posted June 21, 2015 Author Posted June 21, 2015 Simply use the same timer. could you show me what you mean? i was looking at Wiki, but i didnt understand that lol change the timer in your "moveTable". So if i set it like this local moveTable = { --{time, x, y, z, rotX, rotY, rotZ}, {10000, 2896.19, -2397.39, 3.70}, {10000, 2896.19, -2762.60, 3.70}, {10000, 2854, -2874.60, 3.70}, {10000, 1162.09, -2874.60, 3.70}, {10000, 880.70, -2146.5, 3.70}, {10000, 880.70, -1884.09, 3.70}, } you mean it will go same speed all the time?
DonPro Posted June 21, 2015 Author Posted June 21, 2015 Yeah he does.According to the format, yes. Well im sorry, but it does not. thats what im talking about, even if i put 10000millisecond in every it still go faster and slower when it wants, there is something bugged in the script somewhere that i dont understand. thats my problem, so yesterday i tryed to adjust the millisecond (start with 10000 and second 80000 then it goes the nearly the same speed somehow.)
DonPro Posted June 21, 2015 Author Posted June 21, 2015 Yeah he does.According to the format, yes. So what you think? you know what the problem can be?
ALw7sH Posted June 21, 2015 Posted June 21, 2015 Yeah he does.According to the format, yes. Its "Time" not "Speed" It wont go with the same speed unless the space between every 2 points is the same because for example 100km in 10 seconds will go faster than 1000km in 10 seconds
DonPro Posted June 21, 2015 Author Posted June 21, 2015 Yeah he does.According to the format, yes. Its "Time" not "Speed" It wont go with the same speed unless the space between every 2 points is the same because for example 100km in 10 seconds will go faster than 1000km in 10 seconds Thats makes sence, now i understand thanks! now i have to work a bit on it and adjust it thanks bro
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