Results 1 to 7 of 7

Thread: Laser Lock

  1. #1
    Hi

    Is there some script around that will stop an aircraft from being able to release an LGB unless it has a Laser Lock. Humans will be flying.

    thanks..
    Intel Core i7 980X EXTREME, 12 Gig RAM, 240 Gig Revo x 2 SSD, 2 X EVGA (SC) 680GTX's, Win 7 64 Pro,
    Single 27 inch Monitor, Track IR 5, HOTAS Warthog, SIMPEDS Pedals..Arma3 Ready... I hope

  2. #2
    Hi,

    I guess you could remove either the ammo or the weapon when there was no laser lock. Then just add them when there is?

    As for detecting when a target is illuminated, I don't think you can do that within an addon. You would have to set a trigger up, over the target area or the entire map, if needs be. That trigger waits for a lasertarget object, and enables your aircrafts weapons system.

    Would that work for you?

  3. #3
    Quote Originally Posted by (UNN @ June 19 2006,02:11)
    That trigger waits for a lasertarget object
    Do you mean it (the trigger) looks for the actual Laser Designator (ie the weapon carried by someone) or can you actually see a trigger for something being painted with laser?

    The scripting trick we'd like to know either / or / and;
    - If an LD is in use
    - If an LD has a target painted
    - Object link to the actual target.

    I somehow suspect none of these are available with OFP, but it was worth checking .........

  4. #4
    Quote Originally Posted by ([APS
    Gnat @ June 19 2006,11:58)]The scripting trick we'd like to know either / or / and;
    - If an LD is in use
    - If an LD has a target painted
    - Object link to the actual target.

    I somehow suspect none of these are available with OFP, but it was worth checking .........
    As UNN said (AFAIK!) this isn't possible from within an addon in OFP (C'mon Armed Assault!), but in mission editing terms...

    When someone fires a LD an invisible object is created at the point where is hits the ground. Using a trigger you can detect if one of these is present and then assign a variable to it.

    Size:- Big as map
    Activation:- Anybody/Present/Repeatedly

    Condition:- "LaserTarget" countType thisList > 0
    OnActivation:- {Call format ["LaserTarget%1 = _x", "LaserTarget" countType [_x]]} forEach thisList; LaserTarget = true
    OnDeactivation:- LaserTarget = false

    So when the first person fires a LD the variable LaserOn becomes true and the variable LaserTarget1 is the laser dot. Being an object you can use commands like getPos and nearestObject on it.

    You can replace the object type "LaserTarget" with "LaserTargetW", "LaserTargetE" or "LaserTargetG" to distinguish between sides (Haven't tested civilians).




  5. #5
    Bingo !
    Thats what can be used then thanks nindall ... perfect.
    Weren't looking for it to be in an addon, was looking to make bombing in a CTI "LD runs only".

    So if the detected "LaserTargetW" or "LaserTargetE" object is not within XX meters when a bomber drops its bombs, the bombs are transformed in ..... soft fluffy toys .... or something like that.

    Sorry Gonk, I hijacked your thread ... but I think this might be what is required. I'll have a go at making the script.

  6. #6
    First Sergeant gonk's Avatar
    Join Date
    Jul 3 2001
    Location
    Australia
    Posts
    922
    Author of the Thread
    Np Gnat.. thx for all the responses.. Now get to work..

  7. #7
    As posed on the OGN forum;

    <span style='font-size:11pt;line-height:100%'>Laser Designator Only Bombing</span>

    For LGB armed aircraft only and unit with a Laser Designator

    Place Triggers on the map, one named "WestLaser", one named "EastLaser"
    Triggers are 60 x 60 meters
    Set for ANYONE - REPEATEDLY

    Place in the INIT line of aircraft the following or script within CTI to add the following to any newly created Aircraft;

    Quote Originally Posted by [b
    Quote[/b] ]this addEventHandler ["Fired",{[_this] exec "LDdetectW.sqs" } ]
    LDdetectW.sqs
    Quote Originally Posted by [b
    Quote[/b] ]_array = _this select 0
    _weapon = _array select 1
    _ammoname = _array select 4
    _plane = _array select 0

    ; if its not a LGB that was fired, exit
    ?(_ammoname &#33;= "Laserguidedbomb"): goto "Exit"

    ; Get the bomb object
    _missobj = nearestobject[_plane, _ammoname]

    #WaitForDrop
    ; The bomb can impact, and not trigger
    ?(not alive _missobj) : goto "Exit"

    ; Get the bomb&#39;s z pos
    _zpos = getpos _missobj select 2

    ; Wait a little
    ~.05

    ; bombs at 15 metres or more, then loop back
    ?(_zpos > 15) : goto "WaitForDrop"

    ; set Trigger under bomb one last time
    WestLaser setpos getpos _missobj

    ; give time for Trigger to see items
    ~0.3

    ;Check if the special laser target object is within Trigger zone
    ?(("LaserTarget" countType list WestLaser) > 0) : goto "Exit"

    ;no nearby laser target object, therefore delete the bomb
    deletevehicle _missobj

    #Exit
    exit
    Swap EastLaser and LDdetectE.sqs for East version.

    Its not the best code (multiple bombs are all using the same Trigger, at the same time&#33;&#33;&#33; ) but likely low lag.

    I&#39;d like to use nearestobject instead of triggers to find the special "LaserTarget" but it would require a seriously large Loop to scan for all objects.

    Anyone got a better idea to see if the object is nearby the bomb ? ... (without using a trigger)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •