Hello guys!
I tried some things you suggested and I think that the AI will be a little better now in night combat. I tried a little mix with adding NVGs for half a second and revealing and commanding dofire xy.
The only problem now is that I don't know how to implement it.
I built a little and cheap night-combat-improvement script, which should be launched via a trigger when my buddy's knowsAbout reaches 0.0002 ("buddy" is the one I want to get smarter in night combat).
In the condition line I have put this:
Condition: (buddy knowsabout enemy1) > 0.0002
On Activation: [] exec "nightcombat_improvement.sqs";
And it actually worked - he really became smarter.
But this condition line only works for one enemy ("enemy1").
How would a condition line look like so it is valid for every enemy inside a big trigger area that will cover all enemies?I know how to formulate it with my words, but not in script language...
Condition: (buddy knowsabout
what-ever-enemy-in-the-trigger-area-that-covers-all-possible-enemies) > 0.0002
The part in
ittalic is the one I don't know how to spell.
Could you please help me with that? Thank you very very much!
EDIT:A workaround I'm using right now (out of despair) is that I created triggers for
every single enemy group (in total approximately 25 triggers
) that launch the night-combat-improvement script.
But if anyone has another idea for it, please teach me, ok?
EDIT 2:Celery gave me this solution:
Trigger set to Repeat and size 0.
Condition line: true
Activation line: 0=[] spawn {while {alive Dude} do {{if (Dude knowsAbout _x > 0.0002) then {[_x] execVM "engage.sqf"}} forEach list triggername; sleep 1}};
-> The trigger that covers all units has to be set to Activate by Anybody.
This way every unit in the trigger area that is detected by "Dude" will launch the script "engage.sqf", which makes (blind) Dude recognize him as an enemy and thus fighting him finally.
Also see this thread here:
How to identify the _x that activates a trigger?