Tory Xiao 5 Posted October 9, 2021 I'm using this shellTracker.sqf to track fired shells. This script updates the position of the shell with "while {alive _projectile} do", however rocket shells seems to be "dead" when the rocket engine were burnt out, so the last position of rockets is always hundreds of meters away from the actual impact point. How do I fix that? Share this post Link to post Share on other sites
pierremgi 4906 Posted October 9, 2021 try with: while {!isNull _projectile} do... 1 Share this post Link to post Share on other sites
Tory Xiao 5 Posted October 9, 2021 1 minute ago, pierremgi said: try with: while {!isNull _projectile} do... It's really funny to know rocket shells are "dead" when the engines were off lol Share this post Link to post Share on other sites
Tory Xiao 5 Posted October 9, 2021 43 minutes ago, pierremgi said: try with: while {!isNull _projectile} do... Welp, didnt work. The last mark position is still at where the rocket engine went off Share this post Link to post Share on other sites
hcpookie 3770 Posted October 9, 2021 Most arty uses a submunition so you should check to see if the shell "changes" into the submunition. Share this post Link to post Share on other sites
Tory Xiao 5 Posted October 10, 2021 7 hours ago, hcpookie said: Most arty uses a submunition so you should check to see if the shell "changes" into the submunition. The question is how do I find the submunition? Share this post Link to post Share on other sites
h4wek 43 Posted October 17, 2022 Maybe try to spot object connected to shell like I do it in AA system :) - even shell change to submunition - connected object should fly further by inertia (but should have mass parameters like this shell) :) Share this post Link to post Share on other sites
pierremgi 4906 Posted October 17, 2022 On 10/10/2021 at 5:32 AM, Tory Xiao said: The question is how do I find the submunition? Not sure it's a "submunition" question. A simple shell is an ammo (Arma's definition), coming from a magazine, used in a weapon (on a turret). "submunitions" are rather split ammo like cluster shell. If you want to have an idea of what is what, run in init field of a M4 Scorcher: this addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; hint str [_ammo,_magazine,_projectile]; _projectile addEventHandler ["SubmunitionCreated",{ params ["_projectile", "_submunitionProjectile", "_pos", "_velocity"]; systemChat str [_projectile,_submunitionProjectile,_pos]; }]; }]; 1 Share this post Link to post Share on other sites
h4wek 43 Posted July 16, 2023 I discover some bug with explode event handler when used on created subammo parent: submunition creation event handler works but explode handlers on subammo objects is not executed bu this way - question -> why?? I specially attached to parent object to take simulation parameters from parent but it not help. _head = createVehicle [_cluster, getpos _missile, [], 0, "CAN_COLLIDE"]; [_head,_parent] remoteExecCall ["setShotParents",2]; _head attachto [_missile,[0,0,0]]; _head addEventHandler ["SubmunitionCreated", {(_this#1) addEventHandler ["Explode", {params ["_projectile","_pos"]; _pos = ASLToAGL _pos; _hit = getnumber (configfile >> "CfgAmmo" >> (typeof _projectile) >> "Hit"); _range = getnumber (configfile >> "CfgAmmo" >> (typeof _projectile) >> "indirectHitRange"); _diameter = 0.008*_hit;_deep = (((_diameter)^0.8)*0.5) - (_pos#2); systemchat format["hit = %1, range = %2, deep = %3, diameter = %4, position %5",_hit,_range,_deep,_diameter,_pos]; if ((_deep > 0) && (_pos#2 < _range)) then {[_pos,_deep,_diameter,(_diameter>=10),objnull] spawn HWK_Fnc_AMS_CRATER_GEN}; }]}]; {deletevehicle _x}foreach ((attachedObjects _missile) + [_missile] - [_head]) So this can't be executed due to some arma limitation - explode never happen in this way (of course I observe detonations on ground after warhead fragment to subammo but explode eventhandler is not triggered anyway. Of course definition of simulation = "shotSubmunitions"; cause in config that parent missile is not possibile to track and attachto any object so is possibile to use only simulation = "shotMissile"; but in this way subammo not work at all. submunitionAmmo[] = {"RHS_9N24",1}; submunitionConeAngle = 19; submunitionConeType[] = { "poissondisccenter", 50 }; submunitionDirectionType = "SubmunitionModelDirection"; explosionAngle = 60; explosionDir = "explosionDir"; explosionEffectsDir = "explosionDir"; explosionForceCoef = 1; explosionPos = "explosionPos"; explosionSoundEffect = "DefaultExplosion"; explosionTime = 0; explosionType = "explosive"; explosive = 0.8; triggerDistance = 100; deleteParentWhenTriggered = true; warheadName = "Cluster"; definitnion is near the same as cruse missile - cluster but it not work as cluster without additional script. Share this post Link to post Share on other sites