DCSOlympus/scripts/laserDiscoDiscoLaser.lua
bobprofisker 839bf68f6e
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.
2023-03-21 12:48:26 +00:00

21 lines
512 B
Lua

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 ()