_qor 11 Posted October 19, 2015 Hey there, I want to wide the friend/enemy conditions a bit. So even if the player is regarded as enemy to a side, it can be setCaptive true. The conditions for this are fullfilled if the player has no weapon or is inside unarmored car. This is the loop: while {checkCaptive} do { if (vehicle player != player && (vehicle player isKindOf "LandVehicle" OR vehicle player isKindOf "UAZ_AGS30_Base") && !(vehicle player isKindOf "Motorcycle") && !(vehicle player isKindOf "StaticWeapon") && !(vehicle player isKindOf "HMMWV_Base") && !(vehicle player isKindOf "Offroad_DSHKM_base") && !(vehicle player isKindOf "Pickup_PK_base") && !(vehicle player isKindOf "MTVR") && !(vehicle player isKindOf "Ural_Base_withTurret") && !(vehicle player isKindOf "Ural_ZU23_Base") && !(vehicle player isKindOf "Wheeled_APC") && !(vehicle player isKindOf "Tank") ) then {player setCaptive true} else { if (vehicle player == player && primaryWeapon player == "" && secondaryWeapon player == "") then {player setCaptive true} else {player setCaptive false}; }; sleep 1; }; player setCaptive false; And the question is how to control if the loop stops or continues. So if the player has been identified as enemy, the loop has to stop so it wont set the player to captive true again. Unfortunately I realized too late that knowsAbout is not suitable for this, because its result doesnt decrease properly. Actually I wanted to stop the loop if west knowsAbout player >= 0.105 and to continue it if < 0.105. So is there better way to check if the player is not seen/detected by side west? I would combine that with a specific period of time this condition must be true (timeout). Share this post Link to post Share on other sites
f2k sel 164 Posted October 19, 2015 You could have a look at the lineIntersectsWith and associated commands and see if that is something you could use. Share this post Link to post Share on other sites