Add files via upload

just the code in game to create an IR laser and then obliterate the thing a bit later, can also work for us self marking or actually creating an actual laser that can guide bombs with codes set https://wiki.hoggitworld.com/view/DCS_Class_Spot for more info. You can't see laser in NVGs, just IR marker, you can only guide weapons on laser.
This commit is contained in:
bobprofisker 2023-03-21 12:48:26 +00:00 committed by GitHub
parent e8a476e1c7
commit 839bf68f6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,21 @@
lddl = {}
lddl.refreshRate = 1
function lddl.pointer ()
origin = Unit.getByName("Laser")
originPos = origin:getPosition().p
targetPos = Unit.getByName("LaserTGT"):getPosition().p
laser = Spot.createInfraRed(origin , originPos, targetPos)
timer.scheduleFunction(lddl.removePointer,laser, timer.getTime() + lddl.refreshRate)
end
function lddl.removePointer(laser)
Spot.destroy(laser)
timer.scheduleFunction(lddl.pointer,{}, timer.getTime() + lddl.refreshRate)
end
lddl.pointer ()