hi, anyone else had problems using nearObjects to get object reference of a satchel charge placed by AI unit?
this was driving me barmy yesterday, today i thought to try with player instead and it works fine with this code in radio trigger:
when using this code in a script to make AI destroy an object, always returns null object:Code:bomb = ((getpos player) nearObjects ["PipeBomb",50]) select 0;hint format ["nearest bomb is: %1",bomb];
He definitely places a bomb as he barely escapes with his life after deciding to crawl away for the first part instead of run, even with a doMove in careless modeCode:hint "setting charge"; _chargeman Fire ["pipebombmuzzle","pipebombmuzzle","pipebomb"]; _bomb = ((getpos _chargeman) nearObjects ["PipeBomb",50]) select 0; hint format ["nearest bomb is: %1",_bomb];(i suppose that could be due to target being a RU T-72, although with no fuel or ammo)
On that subject, tried removing the crew with this in vehicle init - seems not to work?
Doing it this way because I could not get AI AT to reliably attack an empty unit placed in editor, even with the 'switch sides trick' using dummy groups, so I just create a real enemy, set fuel/ammo to zero and tried removing the crew.Code:{deleteVehicle _x}forEach crew this;
Crux is that i am trying to 'teleport' the satchel a bit closer to the target than the minimum of 7m away where that AI will move to and place it. I have tried every move command available, perhaps it is just the case that next to an enemy tank is considered not a friendly place to be.
everything else in my 'project' i have been able to solve by trying different approaches and the sweat of my brow, but i cannot for the life of me get AI to blow up a damn tank.
AT man with max skill fires two SMAW rounds at fairly close range on a stationary tank and fails miserably to destroy it, so I really need a backup, please
HOME
(i suppose that could be due to target being a RU T-72, although with no fuel or ammo)
Reply With Quote