Jump to content
Barba-negra

setpos getpos and setdir getdir

Recommended Posts

hello all friends, I'm here asking for help, I'm trying to do a spawn position and direction of two objects for some reason is throwing me a position error:

 

Npos =veh1 modeltoworld [0,0,-0.5];
Ndir = (getdir veh1);

publicvariable "Npos";
publicvariable "Ndir";


[] spawn  

Veh2 setPos (getPos Npos); 

veh2 setDir (getDir Ndir);

sleep 1;
 
};

 

the error that gives is error getpos vector objets location 

 

 I do not understand, I did everything right

Share this post


Link to post
Share on other sites

change

Veh2 setPos (getPos Npos); 

veh2 setDir (getDir Ndir);

to

 

Veh2 setPos Npos; 

veh2 setDir Ndir;

 

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, elthefrank said:

hello all friends, I'm here asking for help, I'm trying to do a spawn position and direction of two objects for some reason is throwing me a position error:

 

Npos =veh1 modeltoworld [0,0,-0.5];
Ndir = (getdir veh1);

publicvariable "Npos";
publicvariable "Ndir";


[] spawn  

Veh2 setPos (getPos Npos); 

veh2 setDir (getDir Ndir);

sleep 1;
 
};

 

the error that gives is error getpos vector objets location 

 

 I do not understand, I did everything right

 

Just curious of what you intend to do with that. Why do you need to publicVariable that, why do you spawn your code, where? Are you trying to discover MP scripting?

Share this post


Link to post
Share on other sites

hi @pierremgi, how are you? I'm working on a new submarine for Arma 3

  • Like 1

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

×