Jump to content

Checkpoint arrow limit ?


DakiLLa

Recommended Posts

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

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...