OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pazuzu on 30 Sep 2005, 20:54:58
-
I was wondering if there is a good alternative to using an east detects west trigger? Such as the knowsabout command? Or does the detect trigger work on that principle?
My problem is in the mission I'm making. Its a stealth mission and in the 1rst obj players have to take out 3 guards without being detected using the bas sr25 suppressed sniper rifle or one of the other silenced weapons if they want. When I tried to test using ECP the enemy detects us right away. Its impossible to stay undetected.
I already posted a question in the ECP bug section to find out why its so much easier to be detected but I wanted to find out more about using detect triggers here.
Thanks.
-
I believe the detected by triggers work on the same principle as the knowsabout command.
What you might do though is use knowsabout but require it to be a higher value than the usual 0.105 You would need to experiment but you might want to try 0.5 or even 1.0 to see if that helps.
-
Ok thanks.
Is it possible to use knowsabout for a whole group instead of an east soldier knowsabout one other soldier?
I mean can I get an east soldier to knowabout any member of west team or do I just have to use the command for every unit involved?
Thanks.
-
From comref:
knowsAbout
unit knowsAbout target
Operand types:
unit: Object or Group
target: Object
Type of returned value:
Number
Description:
Check if (and how much) knows unit about target. If unit is vehicle, vehicle commander is considered.
Example:
soldierOne knowsAbout jeepOne
Note the unit can be an Object or Group, but the target can only be an Object. Here is some code I have used:
#loop
~5
if ({alive _x} count (_prisoners) < 1) then {exit}
if ({(Alexi knowsAbout _x) > 0.000001} count (_prisoners) > 0) then {goto"giveMessage"}
goto"loop"
In your case you would need to replace the 0.000001 with some much higher number.