Jump to content

Make JTAC Lase With Trigger


Sedlo

Recommended Posts

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.

Link to comment
Share on other sites

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 ServerScripting 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

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?

Link to comment
Share on other sites

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

LUAERROR.JPG.729a5050b052dfcf3bc09fb589cdc925.JPG


Edited by Sedlo
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...