johnv2pt0 Posted October 3, 2018 Posted October 3, 2018 I'm having trouble getting a created laser spot to update with a moving vehicle. It creates the lase on the target as soon as the function is run, but doesn't update the position. Anyone have any ideas? Thanks ~ function HVTLASE() local jtac = Unit.getByName('HVT_JTAC') local target = Unit.getByName('HVT'):getPoint() local ray = Spot.createLaser(jtac, {x = 0, y = 2000, z = 0}, target, 1113) end LASE = mist.scheduleFunction( HVTLASE, {}, timer.getTime(), 0.25 )
Zayets Posted October 5, 2018 Posted October 5, 2018 (edited) What happens if you change the interval to 1 second instead to 0.25? Also, try to run your function into a do - end block function HVTLASE() local jtac = Unit.getByName('HVT_JTAC') local target = Unit.getByName('HVT'):getPoint() local ray = Spot.createLaser(jtac, {x = 0, y = 2000, z = 0}, target, 1113) end do LASE = mist.scheduleFunction( HVTLASE, {}, timer.getTime(), 1 ) end Another alternative would be to push a lasing task for a (invincible and invisible) shadowing unit and see if that's better. Also, I can't find Spot.createLaser function, I see only Spot.createInfraRed. Is that a new function because I can't see it in the SSE documentation. Edited October 5, 2018 by Zayets [sIGPIC]OK[/sIGPIC]
funkyfranky Posted October 5, 2018 Posted October 5, 2018 In MOOSE local jtac=UNIT:FindByName('HVT_JTAC') local target=UNIT:FindByName('HVT') local spot=SPOT:New(jtac) spot:LaseOn(target, 1113) Laser point will be updated every 0.2 seconds and wiggle a bit automatically. in your code, you would need to use setPoint() in a timer function I believe. https://wiki.hoggitworld.com/view/DCS_func_setPoint A warrior's mission is to foster the success of others. i9-12900K | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
johnv2pt0 Posted October 5, 2018 Author Posted October 5, 2018 Thanks guys, I'll check it out. I tried what you suggested Zayets and it didn't seem to do anything. I think the problem is that the laze goes into a table of some sort and doesn't update...idk. I've been trying to stay away from using moose funky, but I'll go that route if I have to. Thanks I really appreciate it!
funkyfranky Posted October 5, 2018 Posted October 5, 2018 I've been trying to stay away from using moose funky, but I'll go that route if I have to. Thanks I really appreciate it! You dont have to but it does not hurt either ;) In your code, create the laser once and use the setPoint function to update the position of the laser point to the new location of the target. Currently, you are recreating the laser, which obviously does not work as expected. A warrior's mission is to foster the success of others. i9-12900K | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
johnv2pt0 Posted October 6, 2018 Author Posted October 6, 2018 Ah yeah, thanks. I didn't read that part in your original post!
Recommended Posts