Jump to content
Mirek

SetPosATL not working

Recommended Posts

Hi

i have a trigger an AI and some markers.

The AI is named host_1

The markers are zaj_1 to zaj_9

The trigger is triggered by a presence of an damaged empty helicopter, and in onAct field it has folowing:

host_1 setPosATL [getPosATL zaj_1 select 0, getPosATL zaj_1 select 1, getPosATL zaj_1 select 2]; 

I also tried this:

_pos = getPosATL zaj_1; 
 host_1 setPosATL _pos;

But the host_1 doesnt teleport to the zaj_1 marker.  and i have no idea why.

Share this post


Link to post
Share on other sites
6 minutes ago, Mirek said:

The markers are zaj_1 to zaj_9

 

if they are marker names you must use the getMarkerPos "zaj_1"  etc. to get position. the getpos commands wont work with markers

  • Thanks 1

Share this post


Link to post
Share on other sites
10 minutes ago, gc8 said:

 

if they are marker names you must use the getMarkerPos "zaj_1"  etc. to get position. the getpos commands wont work with markers

 

Hi thanks for reply i tried to add the "" but it still dont work.

   host_1 setPosATL [getPosATL "zaj_1" select 0, getPosATL "zaj_1" select 1, getPosATL "zaj_1" select 2]; 

gives an error in expression.

_pos = getPosATL "zaj_1"; 
 host_1 setPosATL _pos;

Gives error "expected something"

Share this post


Link to post
Share on other sites
2 minutes ago, Mirek said:

Hi thanks for reply i tried to add the "" but it still dont work.


   host_1 setPosATL [getPosATL "zaj_1" select 0, getPosATL "zaj_1" select 1, getPosATL "zaj_1" select 2]; 

gives an error in expression.

 

 

as I was trying to say, marker names wont work with getPosATL command :smile_o:

 

So for example:

 

_pos = getMarkerPos "zaj_1"; 
 host_1 setPosATL _pos;

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Ah ok so what do i do then? how can i get the possition of the marker?

 

Share this post


Link to post
Share on other sites
1 minute ago, Mirek said:

Ah ok so what do i do then? how can i get the possition of the marker?

 

Like I have just shown you in the code example (getMarkerPos). :)

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Ah ok thanks. works as charm.

 

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

×