Jump to content
Reeveli

Moving marker to laser target

Recommended Posts

I am working on a mission that uses the Aliascartoon's rather awesome JDAM script. However the script requires an object as the target. An invisible helipad will do. However I would like to have the invisible marker move to the position that a player is lasing using the laser designator whenever a script is activated. I tried to search the forums but couldn't find anything that I would get to work. I have tried playing around with the getmarkerpos and getpos laserTarget player commands but without success. Any tips?

Share this post


Link to post
Share on other sites
_pos = position (laserTarget player);
_pos2D = [_pos # 0, _pos # 1];
"Marker" setMarkerPos _pos2D;

Untested but this should move a marker to wherever the player is lasing. 

Share this post


Link to post
Share on other sites
44 minutes ago, stanhope said:

_pos2D = [_pos # 0, _pos # 1];

That is not needed. If you give setMarkerPos a 3D position it will just ignore the height

 

Actually..... setMarkerPos takes Position2D or Position3D. Markers have a 3D position. I updated the wiki page to fix that.

  • Like 1

Share this post


Link to post
Share on other sites

Good to know :)  I was just going off of the wiki.

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

×