Jump to content
Sign in to follow this  
Absolution_15th

SetPos Not working in latest patch?

Recommended Posts

I have numerous missions that involve setpos script logic. Ever since the latest patch they have all stopped working. What do I have to do to get them working again?

init file

TP1 addAction ["Teleport to Front", "scripts\teleports\TP2.sqf"];

TP2.sqf

player setPos [getPos TP2 select 0, getPos TP2 select 1, getPos TP2 select 2];

This set up used to allow me to scroll the action menu and teleport me from an object named TP1 and put me right next to an object named TP2. It has worked flawlessly since I started playing ARMA2 18 months ago.

*edit* I misspelled the header for the coding. it is named properly in the mission folder.

Edited by Absolution_15th

Share this post


Link to post
Share on other sites

There is nothing wrong with setpos in latest patch.

you refer to a script called

scripts\teleports\TP2.sqf in your action. but your actually call it. TPD. according to your code

Share this post


Link to post
Share on other sites
There is nothing wrong with setpos in latest patch.

you refer to a script called

scripts\teleports\TP2.sqf in your action. but your actually call it. TPD. according to your code

It's a typo in my header and has nothing to do with my code which does indeed reference TP2.

This script has worked fine and is 100% unchanged but all of a sudden refuses to work.

Anyone have an idea?

Share this post


Link to post
Share on other sites

Report says:

TP1 addAction ["Teleport to Front", "scr>
 Error position: <TP1 addAction ["Teleport to Front", "scr>
 Error Missing ;

But here is my code for all of the teleports including one line before and after:

TP1 addAction ["Teleport to Front", "scripts\teleports\TP2.sqf"];
TP1 addAction ["Teleport to Land Nav", "scripts\teleports\NAVStart.sqf"];

TP2 addAction ["Teleport to Rear", "scripts\teleports\TP1.sqf"];

TCargo addAction ["Teleport to Front", "scripts\teleports\TP2.sqf"];
TCargo addAction ["Teleport to Rear", "scripts\teleports\TP1.sqf"];
TCargo addAction ["Teleport to Land Nav", "scripts\teleports\NAVStart.sqf"];

NAVStart addAction ["Teleport to Start 1", "scripts\teleports\NAV1.sqf"];
NAVStart addAction ["Teleport to Start 2", "scripts\teleports\NAV2.sqf"];
NAVStart addAction ["Teleport to Start 3", "scripts\teleports\NAV3.sqf"];
NAVStart addAction ["Teleport to Start 4", "scripts\teleports\NAV4.sqf"];
NAVStart addAction ["Teleport to Start 5", "scripts\teleports\NAV5.sqf"];
NAVStart addAction ["Teleport to Rear", "scripts\teleports\TP1.sqf"];

Where am I missing a ";"? I only see the TP1 error repeated several times without any reference to an error at NAVStart, TCargo or TP2. Keep in mind this mission worked just fine one day and then stopped working the next with NO changes to any of the scripts.

None of the teleports above work.

Share this post


Link to post
Share on other sites

odd. i cant see any missing ;

maybe you have some weird char's in your script.

Share this post


Link to post
Share on other sites

did you try

player setPos [(getPos TP2) select 0, (getPos TP2) select 1, (getPos TP2) select 2];

sometimes that helps :/

also try the asl and atl versions of getpos/setpos

Share this post


Link to post
Share on other sites

Activate -ShowScriptErrors in your shortcut, so errors show up on screen as well, then comment the lines. And/or output all the variables (using diag_log format ["%1",yourvariable] format) to check if something stands out as undefined.

Share this post


Link to post
Share on other sites

Solved. The error wasn't with the teleport scripting at all but with another script entirely. Coincidentally I was missing a ";" on that script and subsequently must have caused the whole logic to abort.

Thanks for the help.

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  

×