Sedlo Posted November 21, 2017 Share Posted November 21, 2017 Hello All! Is there a way that you can force a JTAC/Predator to lase a target without going through the regular Radio Menu / JTAC stuff? I'm thinking about writing a mission that will have voice actors playing the part of the JTAC instead of the default robot. So ideally I'd like it if when a certain flag becomes active, the JTAC will lase the target. My Youtube Channel MY DCS MISSIONS Link to comment Share on other sites More sharing options...
Grimes Posted November 21, 2017 Share Posted November 21, 2017 Using the scripting engine you can create a laser on a trigger. http://wiki.hoggit.us/view/DCS_func_createInfraRed The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
ESAc_matador Posted November 21, 2017 Share Posted November 21, 2017 (edited) ctld.laseUnit(Unit.getByName(enemyname),Unit.getByName( _jtacunit), "jtacgroup", lasercode) Try this Edited November 22, 2017 by ESAc_matador Link to comment Share on other sites More sharing options...
Sedlo Posted November 22, 2017 Author Share Posted November 22, 2017 Using the scripting engine you can create a laser on a trigger. http://wiki.hoggit.us/view/DCS_func_createInfraRed Not having much luck on this one.... The script seems to load ok, but no laser or IR on target that I can detect. JTAC Unit Name is JTAC1, hostile truck is ENEMY. They're both situated on a runway together, line of sight. Below is what I've got NEW TRIGGER, TIME MORE than 15, Do SCRIPT: local jtac = Unit.getByName('JTAC1') local target = Unit.getByName('ENEMY'):getPoint() local ray = Spot.createInfraRed(jtac, {x = 0, y = 1, z = 0}, target, 1688) I've tried loading MIST on startup, at 5 seconds, CTLD, etc... Nothing seems to be happening re: laser and targeting LSS mode on the A-10C. Any ideas? My Youtube Channel MY DCS MISSIONS Link to comment Share on other sites More sharing options...
Sedlo Posted November 22, 2017 Author Share Posted November 22, 2017 (edited) Hey Matador! I've followed your steps below, and come up with this error when the ctld.laseunit is triggered: (see attached image) there is a function already done in the CTLD script. So, if you load the MIST script last version, then the CTLD last version and then you loadt this function (couple of seconds at least... to ensure. Or may be 10 minutes later, up to you) ctld.laseUnit(Unit.getByName(enemyname),Unit.getByName( _jtacunit), tostring(_jtacgroup), lasercode) where enemyname = The name of the enemy to be lased(i.e: "redinfantry3") _Jtacunit = the name of the lasing unit(i.e:"nightmare11") _jtacgroup = the name of the group of the lasing unit("nightmaregroup") lasercode = number of the laser code (i.e: 1688 ) by using this script together with the CTLD, you can even lase movng targets, from moving Jtacs, you dont need to create a new one. Dont forget, when your target is destroyed, you should also do: ctld.cancelLase(_groupname) to stop lasing... if not... the laser wont be removed. I hope it helps Edited November 22, 2017 by Sedlo My Youtube Channel MY DCS MISSIONS Link to comment Share on other sites More sharing options...
Sedlo Posted November 22, 2017 Author Share Posted November 22, 2017 there is a function already done in the CTLD script I hope it helps I've downloaded and opened the example missions, which seem to work just fine when I run them. But when I try to duplicate the triggers and code in my own mission, I get the previous error. I've done a repair to my installation (just in case that was the problem), with no success. I'm a bit at a loss. My Youtube Channel MY DCS MISSIONS Link to comment Share on other sites More sharing options...
ESAc_matador Posted November 22, 2017 Share Posted November 22, 2017 There is an error in line 7... can you post all your script, or better send your mission. Please. I have a script called Have a look at this script. I used this command. https://forums.eagle.ru/showthread.php?t=162709&page=2 Link to comment Share on other sites More sharing options...
ESAc_matador Posted November 22, 2017 Share Posted November 22, 2017 Try this ctld.laseUnit(Unit.getByName(enemyname),Unit.getByName( _jtacunit), "_jtacgroup",lasercode) Removed tostring... since I took it from a script I have. Link to comment Share on other sites More sharing options...
Sedlo Posted November 22, 2017 Author Share Posted November 22, 2017 Here's the mission I'm trying this out on... There is an error in line 7... can you post all your script, or better send your mission. Please. I have a script called Have a look at this script. I used this command. https://forums.eagle.ru/showthread.php?t=162709&page=21JTACTEST.miz My Youtube Channel MY DCS MISSIONS Link to comment Share on other sites More sharing options...
Sedlo Posted November 23, 2017 Author Share Posted November 23, 2017 JTAC Laser Update OK, not sure why this worked out, but here is what I did. I downloaded the JTACAutolase.lua and tried running it. That's when I got the error and couldn't figure it out. What I did was copy the lua text from here: https://github.com/ciribob/DCS-JTACAutoLaze/blob/master/JTACAutoLase.lua into Notepad++, saved it as a new lua file, loaded it and voila! It worked! Not sure how, not sure why, but it's working now! My Youtube Channel MY DCS MISSIONS Link to comment Share on other sites More sharing options...
Recommended Posts