kocrachon 2 Posted December 28, 2007 So I got a few questions 1: How do I make an AI player Laser Designate a specific building. I did this at first <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">AIsoldier1 commandtarget 2342553 2342553 is the ID of the building, but that didnt work. Then I gave it a destroy waypoint, that didnt work. Then I put a vehicle inside the building, but that didnt work either. 2: What all Aircraft/Vehicles can use the laser ability? I know the harrier with GBUs can and I know that the AH-1 can, but what else in the game can target using the Laser Designator. Share this post Link to post Share on other sites
Jeff2121 0 Posted December 28, 2007 I think anything can target with an LD, except infantry. I'm pretty sure all an LD does it just "light up" the target, making it more visible on the Radar. Share this post Link to post Share on other sites
kocrachon 2 Posted December 28, 2007 Well, let me rephrase that a little bit. What vehicles/aircraft optimize the use of it? Like the AV-8 can drop precision bombs that with out it are dumb bombs. Or the AH-1 can pretty much target beyond visual range with it. Anything else get a perk like this? I haven't been able to play around with the SLA aircraft, does it work with them? Share this post Link to post Share on other sites
kocrachon 2 Posted December 30, 2007 Well, back to my focus, is there any way to get an AI player to target a building with a laser designator? Share this post Link to post Share on other sites
Jeff2121 0 Posted December 30, 2007 I remember seeing a thread a while back about this, but..there is a way. Hang on, I'll find it Share this post Link to post Share on other sites
fasad 1 Posted December 30, 2007 Search for "laser" or "laze". I don't think there is a simple working solution to force an AI to fire the designator at an arbitrary target. However, it is simple to create the laser target object on an arbitrary target. Share this post Link to post Share on other sites
kocrachon 2 Posted December 30, 2007 both of them brought up my post. How do I make just a lazered target? Share this post Link to post Share on other sites
fasad 1 Posted December 31, 2007 Again, search, I know the method to create laser objects has been explained. Just remember the laser objects only exist for ~9 seconds then disappear. I've never tried this method so I do not know anything more. I've created a simple script to make an AI to aim and fire the designator at an arbitrary target. It works as is, but really needs a bit more work. I'll post it now since it is new years eve and I'm going on holiday ~1500km away from any 'puters tomorrow! Do whatever you want with the script, i won't look at it again for at least ~10 days. Known limitations/problems : - created in 1.09beta. I have no idea if it would work in any other version. - assumes and will likely only work with a default BI spec-op recon unit with default load-out (i'd like to solve this). - assumes the AI has clear line of sight with intended target. - AI will sometimes end up laser designating through his rifle if he happens to be lifting it to his eye at the moment (should be easy to fix). - contains debug stuff that only wastes cpu time in a real mission. - uses the word "laze" - AI makes no effort to defend itself or evade if it is under fire while designating <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// ceeb_AILaserDesignate.sqf // ArmA Script - Single player only private ["_desLogic", "_recMan", "_target", "_debug", "_timeOut", "_desTime", "_finished"]; _desLogic = "logic" createVehicle [0,0,0]; _recMan = _this select 0; _target = _this select 1; _debug = false; _timeOut = _this select 2; _desTime = 0; _finished = false; if (_debug) then {player sideChat "ceeb_AILaserDesignate.sqf running";}; sleep 0.1; //check _recMan exist and is alive if (_debug AND (!alive _recMan) OR (isnil format ["%1",_recMan])) exitWith {player sideChat "AI is not alive or does not exist, exiting"}; //check if recMan has laserDesignator and ammo if (_debug AND (!(_recMan hasWeapon "laserDesignator") OR ((_recMan ammo "laserDesignator") < 1))) exitWith {player sideChat "AI does not have laser designator equipment, exiting"}; //look at the target through LD and turn it on. _recMan doWatch _target; sleep 5; _recMan selectWeapon "laserDesignator"; sleep 1; waitUntil { (animationState _recMan == "awoppercmstpsoptwbindnon_rfl") OR (animationState _recMan == "awoppknlmstpsoptwbindnon_rfl") OR (animationState _recMan == "awopppnemstpsoptwbindnon_rfl") }; _recMan disableAI "anim"; sleep 0.5; _desLogic action ["useWeapon", _recMan, _recMan, 2]; if (_debug) then {player sideChat "AI is lazing";}; //wait until timeout, target dead or LD man dead while {!(_finished)} do { if (!(alive _recMan) OR !(alive _target) OR (_desTime > _timeOut)) then {_finished = true}; sleep 2; _desTime = _desTime + 2; }; sleep 0.1; _desLogic action ["useWeapon", _recMan, _recMan, 2]; sleep 0.1; _recMan enableAI "anim"; sleep 0.1; _recMan selectWeapon ""; sleep 0.1; _recMan doWatch objNull; if (_debug) then {player sideChat "AI is has stopped lazing";}; deleteVehicle _desLogic; if (_debug) then {player sideChat "ceeb_AILaserDesignate.sqf finished";}; Share this post Link to post Share on other sites