shifty_ginosaji 10 Posted April 13, 2014 (edited) Hello, i am trying to recreate the HEL MD truck mounted point defense laser system that is being tested to destroy mortar/arty rounds and drones within range: http://abcnews.go.com/blogs/politics/2013/12/armys-new-laser-weapon-can-shoot-down-mortars-and-drones/ Does anybody know of a command that would detonate a mortar shell in flight. It might be possible to spawn a small object in for a split second in front of it to detonate it but there must be an easier- and more elegant solution because a script that emulated the HEL MD would be amazing. Any ideas? Edited April 13, 2014 by Madopow2110 Share this post Link to post Share on other sites
cobra4v320 27 Posted April 13, 2014 Perhaps using fired eventhandler or using nearestObjects. Share this post Link to post Share on other sites
shifty_ginosaji 10 Posted April 14, 2014 maybe, but we need to destroy the mortar in flight Share this post Link to post Share on other sites
cobra4v320 27 Posted April 14, 2014 (edited) I placed a truck named artyStopper. I placed a static mortar with this in its init line: this addEventHandler [ "Fired", { _projectile = _this select 6; [_projectile] spawn { private ["_projectile"]; _projectile = _this select 0; waitUntil {_projectile distance artyStopper < 30 + (random 50)}; _blast = createVehicle ["HelicopterExploSmall", position _projectile, [], 0, "NONE"]; _projectile setPos [0.00,0.00,0.00]; }; } ]; So I simulated a blast then moved the artillery round off the map. Edited April 14, 2014 by cobra4v320 Share this post Link to post Share on other sites
John Kozak 14 Posted April 14, 2014 Wouldn't it create performance problems? A lot of WaitUntils... P.S.This script will never end if the projectile wasn't killed by your HEL MD. Just be beware. Share this post Link to post Share on other sites
shifty_ginosaji 10 Posted April 14, 2014 (edited) Thanks, i will work on it it make it even better ---------- Post added at 11:36 ---------- Previous post was at 10:28 ---------- this addEventHandler [ "Fired", { _projectile = _this select 6; [_projectile] spawn { private ["_projectile"]; _projectile = _this select 0; waitUntil {_projectile distance artystopper < 0 + (random 400)}; _laser = "B_40mm_APFSDS_Tracer_Yellow" createvehicle [getPos artystopper select 0, getPos artystopper select 1, (getPos artystopper select 2) +5] ; _laser setdir getdir _projectile; _laser setVelocity [10, 0, 0]; sleep 1; _blast = createVehicle ["HelicopterExploSmall", position _projectile, [], 0, "NONE"]; _projectile setPos [0.00,0.00,0.00]; }; } ]; Its strange because the tracer round never appears, but it works better and it has a very slight chance of the PDS missing Edited April 14, 2014 by Madopow2110 Share this post Link to post Share on other sites
cobra4v320 27 Posted April 14, 2014 (edited) Wouldn't it create performance problems? A lot of WaitUntils...P.S.This script will never end if the projectile wasn't killed by your HEL MD. Just be beware. I see what you mean, there would have to be another check in the waituntil command to see if the projectile was still alive. I hope this at least gets you going in the right direction. Also rather than using setpos you can just delete the projectile. this addEventHandler [ "Fired", { _projectile = _this select 6; [_projectile] spawn { private ["_projectile"]; _projectile = _this select 0; waitUntil {_projectile distance artyStopper < 30 + (random 50) or !(alive _projectile)}; _blast = createVehicle ["HelicopterExploSmall", position _projectile, [], 0, "NONE"]; deleteVehicle _projectile; }; } ]; Edited April 14, 2014 by cobra4v320 Share this post Link to post Share on other sites