Jump to content
Sign in to follow this  
vostov

Simple AI bot Injury Reporting fix proposal. Need small amount of help.

Recommended Posts

What is something I can put into on activation field of a trigger that will make all of the designated units attempt to report themselves injured?

Reason: If these units report themselves injured the truly injured units will be ordered to treat themselves or have the medic assigned to them. As time passes and the trigger activates again other units that might have been missed will eventually be seen to by the medic. (It might be a bit annoying to hear them report this but it's better than them hobbling around bleeding like a stuck pig with perfectly good medical supplies around)

Units named are s1, s2, s3... and so on.

I think - that if I make a trigger that goes off every 3-5minutes and makes units report injuries the lead AI unit will assign the medic to treat them. Therefore the unit stays healthy longer and is able to do more on my long patrol simulations.

This is a possible quick fix to the AI not reporting serious injury? They love to hobble around for hours bleeding when they have a FirstAidKit or even actually are the Medic unit itself. I find this quite infuriating.

I would ask for the command line to make each unit heal itself - but I figure the commanding unit will figure out if that command needs to be issued. I just want them to send out the report. I'd normally press 5, 4 as a subordinate member of an AI lead squad.

(I like leaving them to go on a long walk encountering various enemies and see how long my squad assemblies last)

Any ideas?

Once I have something to play with I'll test it and report results here at this thread.

Thanks.

Edited by Vostov
minor grammar bs

Share this post


Link to post
Share on other sites

There are several way you could so this.

You could just check the damage of each unit every few minutes in a trigger

repeat trigger

cond

round (time %(2*60)) == (2*60)

on act

{ if (damage _x >0)  then { player groupChat "I'm bleeding!!"; } } foreach units group player 

on act

{ if (isBleeding _x) then { player groupChat "I'm bleeding!!"; } } foreach units group player

You could also use an event handler place on each unit although that will only fire when hit.

You could use it to start a check script though.

this addEventHandler ["HandleDamage",{ player groupChat "I'm bleeding!!";}]

units group player;// could be any array of units

player groupChat "I'm bleeding!!";// replace with what code you need to run

Share this post


Link to post
Share on other sites

Actually, I played around with it some.

I made an Alpha Repeating trigger.

I played around with this trigger a bunch. It did not cause the unit in question to report an injury.

No effect.

Also, your version of this made the player say ''I'm bleeding!!" as if I typed it or the designated unit typed it.

This also caused whatever unit I designated in the player's place to do the same. This did not actually cause an AI to report it had sustained damaged and wanted healing.

Something else is needed. This doesn't work.

Edited by Vostov

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  

×