Matthijs
Jan 14 2003, 11:26
Yet another try to create a working LRF.
My guess is that the laser-dot object is created from the laser-designator object. Would it be possible to get a handle of the laser dot?
This way it would be possible to do a range calculation between the laser dot and _this.
Anyone?
whisperFFW06
Jan 14 2003, 13:22
Using a modified laser desig w/ onFire eventHandler, perhaps?
Fired doesn't work, because the Laser Designator doesn't really fire anything.
For a working Laser Rangefinder script, check out my artillery suite at forum.thechainofcommand.net in the public downloads section (you may have to poke around a bit)
In there, the scripts:
InitLLD.sqs
and
SwitchMode.sqs
turn the LaserDesignator into a rangefinder (with readouts in degrees or mils). There's also a "Debug Mode" that will give you grid coords, OFP X,Y,Z coordinates, "teleport player" or "death ray" functionality.
To use:
Put a trigger on the map with a radius equal to the viewdistance (or say 3000m), set to "anybody present repeatedly".
name the trigger "DetectLaser"
from the player with laserdesignator, call initlld.sqs
(in init line: [] exec "InitLLD.sqs")
Double check all this with the documentation I supplied (which should explain how it works too).
now, if you wanted to convert this to an addon, you'd have to have some terrain object with an init eventhandler that loaded this stuff up. You'd also have to replace the trigger with a nearestobject scan (continuously scan a 5-degree arc in front of the player for nearestobject [x,y,z, "LaserTarget"], at 50-m intervals)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.