DakiLLa Posted April 24, 2010 Share Posted April 24, 2010 Hey guys Well, i have a question: is there any limit for checkpoint arrows? I have a table with 20 checkpoints in it and when i do setMarkerTarget on each checkpoint, then after the sixth checkpoint that target arrow is missing. Any ideas how to fix this? piece of code.. for i = 1, #checkpoints - 1 do setMarkerTarget( checkpoints[i], getElementPosition( checkpoints[i+1] ) ); end; Link to comment
50p Posted April 24, 2010 Share Posted April 24, 2010 I do not recommend to use getElementPosition and call it in other function calls. If you want to use the 3 returned values then create 3 variables instead. I am not sure if this will solve your issue but I'm sure it helped me the other day. for i = 1, #checkpoints - 1 do local x,y,z = getElementPosition( checkpoints[i+1] ); setMarkerTarget( checkpoints[i], x,y,z ); end Link to comment
karlis Posted April 24, 2010 Share Posted April 24, 2010 50p wuts problem in such configuration of script?theoretically it should return all fine, thats some bug for lua? Link to comment
50p Posted April 24, 2010 Share Posted April 24, 2010 50p wuts problem in such configuration of script?theoretically it should return all fine, thats some bug for lua? Yes, that's a bug. You can also use something like this: for i = 1, #checkpoints - 1 do setMarkerTarget( checkpoints[i], unpack( { getElementPosition( checkpoints[i+1] ) } ) ); end Link to comment
DakiLLa Posted April 24, 2010 Author Share Posted April 24, 2010 I have tryed to do as you guys said, but same effect. Well nevermind, I have found a hacky solution: I create a little white arrow object over each checkpoint and set it look on the next one. Works fine. Thx for help anyway. Link to comment
karlis Posted April 24, 2010 Share Posted April 24, 2010 just check race resource(might take some time to find wut u need in it), i bet theres solution 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