Jump to content
Sign in to follow this  
Phantom Six

Make AI Shoot Heavy Armored With Small Arms

Recommended Posts

I'm just wondering but how do you force enemy AI to shoot heavy armored vehicles with small arms fire. I tried doTarget and doFire and that doesn't work.

Share this post


Link to post
Share on other sites

Try attaching invisible objects that are destructible by small arms fire to a tank and make the AI target those objects instead of the armoured vehicle to give the illusion of small arms fire aimed at heavy armour. Use the hideObject to make an object invisible to players. As the objects might be destroyed too soon for your purposes, you may consider making them indestructible for a while with allowDamage statements.

Regards,

Sander

Share this post


Link to post
Share on other sites

I tried doing a test with attachTo on a soldier that I made invisible. If the soldier is visible and is sticking out the tank, AI will shoot, but if he's invisible or blocked by the tank, the enemies start fleeing.

Share this post


Link to post
Share on other sites

You need to use the invisible man.

grp = createGroup west; pilot = grp createunit ["InvisibleManW_EP1",getpos this,[],0,"none"];

You will need to remove his weapons and change West to East to change his side as there is no East unit.

Or

you could try and use the useweapon command.

place gamelogic on the map name it gl name your man man and name the tank t1

place in trigger on act, trigger to go off when you need it.

null=[] spawn {man dotarget t1; sleep 1;for "_i" from 0 to 4 do {man dotarget t1; sleep 0.4;for "_i" from 0 to 9 do {sleep 0.1;gl  action ["useweapon",man,man,0]}}};

There may be errors in above as it's taken from memory.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Thanks man, that does the trick. I created the invisible man and use an attachto to the tank.

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  

×