mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
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:
parent
e8a476e1c7
commit
839bf68f6e
21
scripts/laserDiscoDiscoLaser.lua
Normal file
21
scripts/laserDiscoDiscoLaser.lua
Normal 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 ()
|
||||
Loading…
x
Reference in New Issue
Block a user