stoppelhopser 0 Posted July 12, 2003 yo! maybe someone can help cus i´m gettin nuts over this... did a 88mm flak 18 anti aircraft gun... works fine so far if you use it against ground targets such as tanks.... but the d...n AI won´t attack air targets this drives me completely nuts since everything like weapon and ammo aso is derived from corresponding shilka-classes. before i post that rotten cpp i wonder if someone might know what the essential parameters are for a unit/vehicle to attack air targets... i tried hard but didn´t figure it out... i´m already asking myself whether it might be some stupid thing like "damn you mod maker... with a reload time of 4 i wouldn´t even think about attacking a balloon..." HHEEEELP Share this post Link to post Share on other sites
stoppelhopser 0 Posted July 13, 2003 ok... figured it out i guess... AI dosn´t use shells against air targets tried to overcome the problem by definig two muzzles: one with a tank-compatible weapon and ammo, one with a shilka-compatible gun and ammo. but now the problem is that AI doesn´t switch to the anti-air muzzle to attack targets... guess this is one for the pros SUMA? Share this post Link to post Share on other sites
VXR 9 Posted July 13, 2003 i dont know but you can try adding this in the config? Quote[/b] ]irScanRange = 5000;irScanGround = true; Share this post Link to post Share on other sites
stoppelhopser 0 Posted July 13, 2003 thanx put it in, but didn´t do the trick in the first place neither.... plus i dunno what those params do *hehe* but... i figured it out! to get what i wanted i coded some dummy bullet that didn´t have hitpoints, just to trigger the eventhandler. and here was another prob... AI didn´t wanna shoot bullets with hit=0. dunno why, but that was the least i had expected but it works finally and it looks damn kewl ! Share this post Link to post Share on other sites
Marss911 0 Posted July 21, 2003 Good to hear you fixed it. But hey a 88 mm whitout a hit lol Hit neets be on ;) Share this post Link to post Share on other sites
stoppelhopser 0 Posted July 22, 2003 hey marss ... guess you got me wrong here the dummy bullet without dammage was meant only a tracer object, meaning, grab it by eventhandler so can actually cause damage by an explosion in the air, that is, i tried to simulate a timered aa-shell... well, got that so far it really looks nice seeing all these explosions in the air once air targets show up. problem is i haven´t yet figured out how to cause dammage on targets that are in range of the explosion... tried it with nearestObject, but that´d require to be able to use general classes, like "Air", but it seems you gotta be more specific about the type of object u wanna grab. next prob: it won´t be too hard to add a menue for the player to set detonation time for the shell, but ai won´t use it i guess... if someone´s got an idea that´d be great Share this post Link to post Share on other sites
raedor 8 Posted July 23, 2003 i think the best method is to do it with through distance. but you need the velocity of the shells... something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_explosionTime = (_distance / _shellsVelocity) + 1 - (random 2) (_explosionTime in seconds, _distance in meter, _shellsVelocity in meters per second) Share this post Link to post Share on other sites