Jump to content
gc8

AI shooting ground

Recommended Posts

Hi

it's been reported that in my mission the AIs are shooting a flagpole... why is this happening, anyone knows?

 

Flags never hurt nobody and it's created via createvehicle command so it shouldn't even have AI.

 

code used:

 

  _flag = createVehicle ["FlagPole_F", _pos ,[], 0, "CAN_COLLIDE"];

 

(setFlagTexture used to change flag texture)

 

been going through my code that there isn't line that makes AI fire on the flagpole but haven't found anything like that

 

thx!

 

  • Like 1
  • Haha 1
  • Confused 2

Share this post


Link to post
Share on other sites

I will look for:

- modded units with modded Fsms;

- script with spawned laser target;

- script with suppressive fire on position.

:headscratch:

  • Like 1

Share this post


Link to post
Share on other sites
8 minutes ago, pierremgi said:

- script with spawned laser target;

 

does the laser target (LaserTargetW) make ground units fire on the lased target? or is it only for air?

Share this post


Link to post
Share on other sites

Still having this issue in my mission. The AI actually fires ground and not the flag but point is there should not be a target for the AI to shoot and yet they fire. I tried to fix this by deleting every potential target so they would stop firing but to no avail.

 

I tried many different clean up codes to get rid of the targets but even deleting everything except the shooters in my group they still continue to fire. And throw hand grenades too. All to same spot. The only clue I have is resistance guy marker on the map (where they shoot at), but I see no one there.

 

Codes tried:

 

Delete all men:

 


 

_deleted = [];
{
_m = _x;
if(side _m != west && _m distance player < 1000) then
 {
  _deleted pushback _x;
  deletevehicle _x;
 };
} foreach allunits;

hint format["deleting! %1", _deleted];

 

 

delete all objects:

 

_deleted = [];
{
_m = _x;
if(side _m != west && _m distance player < 1000) then
{
 _deleted pushback _x;
 
  diag_log format [">>>>>> %1 ", _x];
  
  deletevehicle _m;
};
 
} foreach (entities [[], [], true, true]);

hint format["deleting! %1", _deleted];

 

 

But nothing helps. Any ideas what to try next?

 

 

Note: nearTargets returns resistance target for my player but there's no resistance man near. Could this be the issue and perhaps a bug in arma?

 

thx!

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, gc8 said:

The only clue I have is resistance guy marker on the map (where they shoot at), but I see no one there.

Getting closer at least !  You'll do it mate !

  • Like 1

Share this post


Link to post
Share on other sites

what about your mods?  or a test mission to share perhaps?

Share this post


Link to post
Share on other sites
13 minutes ago, pierremgi said:

what about your mods?  or a test mission to share perhaps?

 

 

I have CBA, 7erra's editing extensions and 3den Enhanced, mods loaded. The mission I'm talking about has it's thread here I should probably update the download link to latest version but the bug is hard to reproduce so I don't know will that help (Steam download link should have same bug). I already got help in testing (thx to @kremator) but the bug is difficult to fix

Share this post


Link to post
Share on other sites

In the console, try getting array of all objects near that position when you see it happen.  Maybe some invisible object will be revealed to you.

Share this post


Link to post
Share on other sites

We are pulling our hair out here .... it is soo random.  A 'clean' version of the mission suddenly goes rogue - you have to catch the buggers firing aimlessly - it is mostly AA vehicles but I've caught foot mobiles shooting too.

Share this post


Link to post
Share on other sites
12 hours ago, johnnyboy said:

In the console, try getting array of all objects near that position when you see it happen.  Maybe some invisible object will be revealed to you.

 

This is what I did. then I also deleted all nearby objects except the units in my group who are doing the shooting but this did not stop them

Share this post


Link to post
Share on other sites

Tried again with script to stop the shooting. This is what I tried:

 

_deleted = [];
_units = (units (group player));
{
_man = _x;
if(!isPlayer _man) then
{

diag_log format["man %1 targets:",_man];
{
_m = _x # 4;

if(side _m != (side player)) then
{

 _deleted pushback _m;
 
  diag_log format [">>>>>> %1 -- %2 -- %3 -- %4", _x];
  
  deletevehicle _m;
};
} foreach (_man nearTargets 100000);

};
} foreach _units;

hint format["deleting! %1", _deleted];

 

deletes all the targets but didn't help

 

again there's resistance guy icon on map but no one alive there

Share this post


Link to post
Share on other sites

Maybe they're firing at a game logic entity or some other hidden object other than the lasertarget?

Other than disabling scripts/mods and enabling them one by one, there's not much to do if you want to get to the bottom of it.

Also try putting the misbehaving units targetsQuery into the log via diag_log, might be worth a try.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, Grumpy Old Man said:

Maybe they're firing at a game logic entity or some other hidden object other than the lasertarget?

Other than disabling scripts/mods and enabling them one by one, there's not much to do if you want to get to the bottom of it.

Also try putting the misbehaving units targetsQuery into the log via diag_log, might be worth a try.

 

Cheers

 

I have very much the same thoughts. Again I see res soldier marker on the map and every one is shooting at it but there's nothing there visibile in game.  Wish I even knew how to delete that thing would be progress

 

tried:


 

{ if(side _x == resistance) then { deletevehicle _x; }; } foreach allunits;

// And:

{ deleteVehicle _x } forEach allDead;

 

to no avail

Share this post


Link to post
Share on other sites

It seems there is resistance guy hidden somewhere and I have tried deleting it with a script but for some reason deletevehicle will not delete it

 

Here's the code:

 

_deleted = [];
_units = (units (group player));
{
_man = _x;
if(!isPlayer _man) then
{

diag_log format["man %1 targets:",_man];
{
_m = _x # 4;

if(side _m != (side player)) then
{
 
  diag_log format [">>>>>> %1 -- %2 -- %3 -- %4", typeof _m, side _m, _x];
  
  if(  side _m == resistance ) then
  {
   _deleted pushback _m;
   
  deletevehicle _m;
 };
};
} foreach (_man nearTargets 30);

};
} foreach _units;

hint format["deleting! %1 %2", time, _deleted];

 

Like I said deletevehicle does nothing, every time I run this script the GUER guy is on the list

 

Here's what the code prints (For one soldier)  (I_C_Soldier_Para_2_F on top):

 

10:42:45 ">>>>>> I_C_Soldier_Para_2_F -- GUER -- [[4307.48,4366.82,1.35439],""I_C_Soldier_Para_2_F"",GUER,3.89211e+006,1fc0cbd77c0# 178140: i_c_soldier_para_2_f.p3d,0] -- "
10:42:45 ">>>>>> WeaponHolderSimulated -- CIV -- [[4316.19,4359.11,-0.107025],""WeaponHolderSimulated"",CIV,-999996,1fc114fb580# 231379: dummyweapon.p3d,0.0019468] -- "
10:42:45 ">>>>>> WeaponHolderSimulated -- CIV -- [[4314.1,4370.73,-0.106445],""WeaponHolderSimulated"",CIV,-999997,1fcc15f5600# 226760: dummyweapon.p3d,0.00331148] -- "
10:42:45 ">>>>>> WeaponHolderSimulated -- CIV -- [[4322.43,4354.46,0.137711],""WeaponHolderSimulated"",CIV,-999997,1fc9fce2080# 201083: dummyweapon.p3d,0.00163772] -- "
10:42:45 ">>>>>> WeaponHolderSimulated -- CIV -- [[4322.67,4351.38,0.135895],""WeaponHolderSimulated"",CIV,-999997,1fc9fce3580# 201082: dummyweapon.p3d,0.00161114] -- "
10:42:45 ">>>>>> WeaponHolderSimulated -- CIV -- [[4321.1,4372.67,0.133163],""WeaponHolderSimulated"",CIV,-999997,1fc09b0c100# 227582: dummyweapon.p3d,0.00590146] -- "
10:42:45 ">>>>>> WeaponHolderSimulated -- CIV -- [[4327.56,4352.65,0.138138],""WeaponHolderSimulated"",CIV,-999997,1fc3b369600# 227525: dummyweapon.p3d,0.00205998] -- "
10:42:45 ">>>>>> WeaponHolderSimulated -- CIV -- [[4327.04,4350.61,0.138123],""WeaponHolderSimulated"",CIV,-999997,1fc3b36ab00# 227524: dummyweapon.p3d,0.00188131] -- "
10:42:45 ">>>>>> Land_LampShabby_F -- CIV -- [[4335.52,4341.81,3.76347],""Land_LampShabby_F"",CIV,-100000,1fb76cc6b00# 48241: lampshabby_f.p3d,0] -- "
10:42:45 ">>>>>> Sign_Arrow_Green_F -- CIV -- [[4307.5,4366.76,1.3674],""Sign_Arrow_Green_F"",CIV,-100000,1fbe5a08100# 178162: sign_arrow_f.p3d,0] -- "
10:42:45 ">>>>>> Land_BagFence_Long_F -- CIV -- [[4312.43,4323.71,0.416122],""Land_BagFence_Long_F"",CIV,-100000,1fc2afda080# 196688: bagfence_long_f.p3d,0] -- "
10:42:45 ">>>>>> Land_BagFence_Corner_F -- CIV -- [[4313.4,4322.08,0.437973],""Land_BagFence_Corner_F"",CIV,-100000,1fbb5af2080# 196689: bagfence_corner_f.p3d,0] -- "
10:42:45 ">>>>>> Land_BagFence_Corner_F -- CIV -- [[4310.85,4324.95,0.438385],""Land_BagFence_Corner_F"",CIV,-100000,1fb96a59600# 196690: bagfence_corner_f.p3d,0] -- "
10:42:45 ">>>>>> Sign_Arrow_Blue_F -- CIV -- [[4327.35,4346.31,1.37471],""Sign_Arrow_Blue_F"",CIV,-100000,1fbd82e4b80# 226235: sign_arrow_f.p3d,0] -- "
10:42:45 ">>>>>> Sign_Arrow_Blue_F -- CIV -- [[4325.95,4349.66,1.37459],""Sign_Arrow_Blue_F"",CIV,-100000,1fcbf604100# 226238: sign_arrow_f.p3d,0] -- "
10:42:45 ">>>>>> Sign_Arrow_Blue_F -- CIV -- [[4324.28,4351.2,1.37471],""Sign_Arrow_Blue_F"",CIV,-100000,1fc49e8ab00# 226239: sign_arrow_f.p3d,0] -- "
10:42:45 ">>>>>> Sign_Arrow_Blue_F -- CIV -- [[4334.48,4370.52,1.37473],""Sign_Arrow_Blue_F"",CIV,-100000,1fbc19aa080# 226246: sign_arrow_f.p3d,0] -- "
10:42:45 ">>>>>> Sign_Arrow_Blue_F -- CIV -- [[4321.95,4356.3,1.37468],""Sign_Arrow_Blue_F"",CIV,-100000,1fb9d121600# 229859: sign_arrow_f.p3d,0] -- "
10:42:45 ">>>>>> Sign_Arrow_Blue_F -- CIV -- [[4318.82,4355.45,1.37459],""Sign_Arrow_Blue_F"",CIV,-100000,1fcc2536080# 229869: sign_arrow_f.p3d,0] -- "
10:42:45 ">>>>>> Sign_Arrow_Blue_F -- CIV -- [[4319.68,4355.83,1.37469],""Sign_Arrow_Blue_F"",CIV,-100000,1fc4bd55600# 229878: sign_arrow_f.p3d,0] -- "
10:42:45 ">>>>>> Sign_Arrow_Blue_F -- CIV -- [[4317.93,4353.27,1.3746],""Sign_Arrow_Blue_F"",CIV,-100000,1fc4b692080# 229898: sign_arrow_f.p3d,0] -- "
10:42:45 ">>>>>> Sign_Arrow_Blue_F -- CIV -- [[4318.71,4352.13,1.37471],""Sign_Arrow_Blue_F"",CIV,-100000,1fcc24d5600# 229910: sign_arrow_f.p3d,0] -- "

 

Why is delete not working?

Share this post


Link to post
Share on other sites

Hey I think I found the reason for this buggy behavior

 

It says this in deleteVehicle wiki:

Do not use this command for deletion of dead crew members from a vehicle. Doing so may lead to all sorts of bugs and ghost objects left on the map. Instead use deleteVehicleCrew, which was designed with this functionality in mind

 

That must be the reason. also explains why it was not possible to clear these ghost objects

 

  • Like 1

Share this post


Link to post
Share on other sites

Is there any crew onboard a flag pole?? 

Sorry, i'm lost. :sigh:

Share this post


Link to post
Share on other sites
2 minutes ago, pierremgi said:

Is there any crew onboard a flag pole?? 

Sorry, i'm lost. :sigh:

 

no but there are vehicles and according to wiki I was deleting the vehicles crew wrong way and hence the ghost shooting. Still trying to fix this problem but getting closer

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×