Jump to content
Sign in to follow this  
Ice_Rhino

AI Report Direction of Fire

Recommended Posts

I have a mission that I am working on. Four divers come ashore and perform a set of tasks whilst the player(s) provide Over-watch Sniper cover from a nearby hill. When the divers come under fire they report in that they require assistance using the following code;

this allowDamage false;blu_divers = group this;this addEventHandler ["Killed",{    if (isNil "DeadDivers") then {DeadDivers = 0};    DeadDivers = DeadDivers + 1;    publicVariable "DeadDivers";  }];this addEventHandler ["FiredNear", {(_this select 0) sideChat "We are under fire, requesting assistance!"; } ];

Is it possible to get them to report which direction they are under fire from and add that to the sideChat text?

Also, they hunker down when they are threatened and I do not necessarily know why, any way for them to report that or just reset them on a Radio command??? The fire from direction is more important.

Thanks in advance

T

Share this post


Link to post
Share on other sites

So the problem with "FiredNear" is that units must be within 69 meters for it to flag. Arma's AI can engage from outside of 200 meters, and they can easily spot enemies within 100 meters. But if you've gotten that solved already you can try the reveal command. I'm not sure if this would make units use their radio to call out enemies or not. But if they do, then it would require the units to be in a group with the player or he would never see the radio message. Another, possibly better, solution would be to make the soldier that was fired at respond with a sideChat message, although, this has locality issues in multiplayer (sideChat only writes the message for computer where the code was run, it does not work like normal side chat messages in multiplayer) and if you don't code it carefully you'll end up with numerous side chat messages as each soldier responds to the threat.

Share this post


Link to post
Share on other sites

Hi DE,

No I do not have the FiredNear distance issue worked out. I did not even know about the 69m until you just said it. I am not sure how to progress now then.

Thanks anyway DE

T

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  

×