Jump to content
Sign in to follow this  
stoppelhopser

Help: anti-air don´t attack air targets....

Recommended Posts

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 crazy_o.gif AI won´t attack air targets crazy_o.gifcrazy_o.gif

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..."

tounge_o.gif

HHEEEELP

Share this post


Link to post
Share on other sites

ok... figured it out i guess...

AI dosn´t use shells against air targets mad_o.gif

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 tounge_o.gif SUMA? biggrin_o.gif

Share this post


Link to post
Share on other sites

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

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! tounge_o.gif

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 tounge_o.gif

but it works finally and it looks damn kewl !

Share this post


Link to post
Share on other sites

Good to hear you fixed it.

But hey a 88 mm whitout a hit lol smile_o.gif

Hit neets be on ;)

Share this post


Link to post
Share on other sites

hey marss smile_o.gif

... guess you got me wrong here wink_o.gif 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 tounge_o.gif

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×