Jump to content
csparks23

Mortar or artillery wont fire

Recommended Posts

Hello, I am trying to make certain AI mortars fire upon a marker when a trigger is activated.  I'm using

 

unitname doArtilleryFire [getmarkerpos"markername", "8Rnd_82mm_Mo_shells", 8];

 

and when the trigger is activated they will turn and face the target and then the mortar just kind of bobs.  Goes from like 80 degree angle to 60 degree angle over and over never firing.  I know zero about scripting but i know i have everything named properly.

Share this post


Link to post
Share on other sites

Check if mortar in range of target. try this condition

if ((getMarkerPos "markerName") inRangeOfArtillery [[mortarName], "8Rnd_82mm_Mo_shells"]) then 
{
	hint "fire";
}
else 
{
	hint "out of range";
}

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

×