Jump to content
oksman

Create Scripted Laser Target for Human Pilot

Recommended Posts

Hey I've been trying to figure this out and I can't seem to get it working, my intent is creating a script that creates random targets for CAS practice, and I've made so there's smoke spawned near the enemy to guide dumb fire, what I'm missing is to simulate having an FAC on the ground who has a laser on target.
 

So what I'm trying to make is a scripted laser show up on the HUD / Sensor of the players airframe and this is intended for use on dedicated server hence the dynamic variable.

 _laser = createVehicle ["LaserTargetW" ,getPos _randomTarget, [], 0, "CAN_COLLIDE"];     [side _Player,[_laser , 3600]] remoteExec ["reportRemoteTarget",0]; [_laser,[side _Player, true]] remoteExec ["confirmSensorTarget",0];

 

_randomTarget is just a invisible helipad. side _Player is in this case EAST hence the "LaserTargetW". Anyone got a clue about this? Is there another solution to make scripted laser for human pilots?
 

Thanks for any help in advance

Share this post


Link to post
Share on other sites
9 hours ago, oksman said:

side _Player is in this case EAST hence the "LaserTargetW"

 

Pretty sure that's the opposite of what you want. "LaserTargetW" creates a pseudo-vehicle on side EAST for side WEST to target/attack.

  • Like 1

Share this post


Link to post
Share on other sites

Damn, I read the opposite in another thread. I'll give that a go and return! Thanks

Edit:
So I've managed to make the target pop up both with TargetE and W for east, however it disappears after 5 seconds instead of remaining for the time designated. 

_laser spawn { while {!isNull _this} do {sleep 0.1;}; systemChat "Laser gone..."};

This fires every time after a few seconds.

Share this post


Link to post
Share on other sites
14 hours ago, oksman said:

however it disappears after 5 seconds instead of remaining for the time designated

Attach the laserTarget to the designated object(your _randomTarget heli pad invis) to stop it from disappearing.

Share this post


Link to post
Share on other sites
8 hours ago, Larrow said:

Attach the laserTarget to the designated object(your _randomTarget heli pad invis) to stop it from disappearing.

Larrow you legend. Is there any documentation that mentions this or is this one of your many magical skills?

Thanks a bunch! That's sorted it

  • Like 1

Share this post


Link to post
Share on other sites
20 hours ago, oksman said:

Is there any documentation that mentions this or is this one of your many magical skills?

No, I just remember the solution from a forum thread long ago.

  • 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

×