BTW try the "pilot" selection name for the head.
Thanks that "pilot" is better.
I added extra function to check if the unit´s body is "watching" at player´s direction (180 sight angle). It could be combined with the LOS function (need function module):
With the old triggers (repeatetly):Code:sleep 3; while {true} do { waituntil {sleep 1; (abs(([b, a] call BIS_fnc_dirTo) - direction b)) <= 90 || (abs(([b, a] call BIS_fnc_dirTo) - direction b)) >= 270}; hint "seen"; waituntil {sleep 1; (abs(([b, a] call BIS_fnc_dirTo) - direction b)) >= 90 && (abs(([b, a] call BIS_fnc_dirTo) - direction b)) <= 270}; hint "not seen"; }
Code:Condition: ((abs(([b, a] call BIS_fnc_dirTo) - direction b)) <= 90 || (abs(([b, a] call BIS_fnc_dirTo) - direction b)) >= 270) && !(lineIntersects [[getposASL a select 0, getposASL a select 1,(getposASL a select 2)+((a selectionPosition "pilot") select 2)],[getposASL b select 0, getposASL b select 1,(getposASL b select 2)+((b selectionPosition "pilot") select 2)]]) On Act: hint "In sight";
Not yet checks the heads direction.Code:Condition: ((abs(([b, a] call BIS_fnc_dirTo) - direction b)) >= 90 && (abs(([b, a] call BIS_fnc_dirTo) - direction b)) <= 270) || (lineIntersects [[getposASL a select 0, getposASL a select 1,(getposASL a select 2)+((a selectionPosition "pilot") select 2)],[getposASL b select 0, getposASL b select 1,(getposASL b select 2)+((b selectionPosition "pilot") select 2)]]) On Act: hint "Not in Sight";![]()
saok i think you should create separated thread so your great effort and examples aren't lost
also note this beta is obsolete alreadyand unstable like hell
![]()
RealTimeChat ~ARMA2 in Your browser (w/o Java), RealTimeChat ~ARMA3 in Your browser (w/o Java),
irc.GameSurge.net/ARMA2 (external IRC clients) irc.GameSurge.net/ARMA3 (external IRC clients)
ARMA 3 Feedback Tracker: http://feedback.arma3.com/my_view_page.php
~100k fans @STEAMARMA 2 + ARMA 2: OA + ARMA 3: + ~2k @XFIRE A2:OA
Follow my Twitter: http://twitter.com/FoltynD or my Facebook http://facebook.com/FoltynD
Thanks, I will. Will be found in editing section.
http://forums.bistudio.com/showthrea...96#post2161496
Last edited by SaOk; Jun 1 2012 at 21:15.
Absolutely correct. Actually all you can provide are the objects to be ignored during the test. The primary purpose is that when you are performing LOS between two objects, you are not interested in intersections happening in those two objects. You can provide any other two objects if desired, or simple objNull (or shorter argument array) when performing a free test with endpoints not related to objects.
I have tried to clarify the wiki, feel free to improve more.
Note: in 93597 there is a fix of a bug causing the second object listed to be "ignored to be ignored" when you request the result to be sorted by passing true as a 5th argument. Moreover, parameter types are now checked, therefore you cannot pass a different type instead of an object. Moreover, 93598 brings new commands eyePos and aimPos, which can be used to provide often needed endpoints for intersection functions.
Ondrej Spanel, BIS Lead Programmer
Spoiler:
Ha! Great job with eyepos and aimpos!
... if we get up vector of upper part of player's body, I'd be able to fully implement scripted reflex sights. Just EOTechs need the up vector![]()