Hi AGAIN!
I'm sorry for making so many topics, but I am in the middle of a time of scripting furiously to meet deadlines.
My problem this time is how to make soldiers notice enemies when it is extremely dark.
Without any augmentation, OFP A.I. will let the enemy practically walk all over them before they consider removing their weapon from their back.
I have made the following script to attempt to improve the soldier's perception, but to no avail:
_p = _this select 0
closesttarget = preprocessFile "closesttarget.sqf";
#L
~(random 2)
_t = [gblallenemies, _p] call closesttarget
? (_p distance _t) < 50 : goto "R"
goto "L"
#R
hint "REVEAL"
_p reveal _t
goto "L"
The hint does appear, suggesting that my system of identifying when an enemy is near does activate, but the reveal function does nothing to make the soldiers notice their enemies!
Can anyone suggest a better method for making my soldiers smarter?
Thanks in advance,
Lone-Wolf