Hi all, getting back into all this editing malarky after a break.
I'm back to doing 'Nam MP missions, and am stuck on something.
I can't get AI enemy small arms armed guys to fire on an airborne helo, even though they could damage it. An RPG guy will try a lucky shot. If I land in the middle of an enemy squad, they all mill around - some wll throw grenades and the RPG guy will take a shot, but no small arms.
I've tried landing and shooting at the helos myself, and you can cause damage will small arms, so why won't they fire?
I've tried dotarget and dofire, but they just won't fire.
Any tips would be appreciated.
I'm flying the cayuse from sebnam pack, but the principle will be the same for all.
Thanks in advnace, Martin
Setpos invisible infantry targets on the helicopter.
A script like:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop
helotarget setpos getpos helo
helotarget setvelocity velocity helo
?alive helo: goto "loop"
should work. Name the helo and target as in the script.
Thanks for the quick reply.
Not sure how to complete it though. Invisible infantry unit?
I've got a helicopter called loach1. I created a unit of a soldier called helotarget1, and scripted it as you said, but he seems to hang out the bottom of the helo, so I changed it to add 2 to the vertical getpos, so now he's just above the helo (so he does't detonate grenades dropped out the helo). The idea worked, in that they open fire, although he also dies fairly quickly. I guess I need to regenerate him with a health check back up to full.
If I have multiple helos, I just need a similar script for each.
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
helotarget1 setPos [getPos loach1 select 0, getPos loach1 select 1, (getPos loach1 select 2) +2]
helotarget1 setvelocity velocity loach1
? ((damage helotarget1) > 0.1) : setdammage helotarget1 0
?alive loach1: goto "loop"
Checked through all the soldiers, and couldn't see (pardon the pun) an invisible one. Is it in an add-on?
The soldier also fires, so I set him to ammo of zero, but then if there's an invisible unarmed soldier I can use for the target that solves all my problems.
Haha, the AI shoots from mid-air?! That's badass!
I meant to use an addon that has a target for infantry such as Les' invisible targets addon.
Got the pbo from your link and added it to the addons folder. However, still cant see an invisible unit type to select. Which category does it come under - men, objects, etc.
Tried searching for the original les invisible target post to see if there was a readme but couldn't find anything, well actually found loads of posts with the word 'invisible' in but couldn't find a readme for that addon.
No doubt it's right in front of my eyes....
It's under Empty/Objects/Inv.target mann west.
Ooh yeah, they're shooting up my Loach good and proper now.
The invisible targets solved all the AI firing/health problems as well. Nice.
Thanks for your help.