Jump to content
Sign in to follow this  
rick rawlings

GPS tracking script

Recommended Posts

I'm trying to create a tracking script that follows a car around the map and reports in every ten seconds, so I wrote this in a script that is called in the init.sqs:

#start
"car" setMarkerPos getPos car1;
~10;
goto "start";
exit

for a marker named "car" and a car called, well, "car1" but I get an error #7 with a failure during preprocessing when I go to check the mission. Anybody help me with the error?

Thanks!

RR

Share this post


Link to post
Share on other sites

Well I literally just had a problem like this, and I tried using an sqs file, but I couldn't figure it out. So instead, I used sqf. For this it would be

while {true} do
{
 "car" setMarkerPos getPos car1;
 sleep 10;
};

That should work.

Share this post


Link to post
Share on other sites
I'm trying to create a tracking script that follows a car around the map and reports in every ten seconds, so I wrote this in a script that is called in the init.sqs:

#start
"car" setMarkerPos getPos car1;
~10;
goto "start";
exit

for a marker named "car" and a car called, well, "car1" but I get an error #7 with a failure during preprocessing when I go to check the mission. Anybody help me with the error?

Thanks!

RR

I would try that.

"car" setMarkerPos [getPos car1 select 0, getPos car1 select 1];

I think the getPos on a car returns an array of lenght 3, [x,y,z] and setMarkPos needs an array of lenght 2, [x,y]

Try that.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×