OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: six6six on 31 Jul 2008, 16:29:48
-
I have 2 problems regarding the same script.
Ive downloaded the fuction "AngleFacingDiff.sqf" and Im not entirely sure how to use it. I want to tell whether a unit in this case _guy is looking at object _thing. So I have called it with the line [_guy,_thing] call AngleFacing after loading it before the mission as AngleFacing.
]
_ang= [_guy,_thing] call AngleFacing
if (_ang < 10) then (goto "next1")
if (_ang >350) then (goto "start")
Im using this code to see if he is looking within 10 degrees either side of the object. Are there any problems?
I ask, as when I put in hint format ["Angle = %1", _ang]I get a load of random numbers and letters which show up when you have screwed up the numbers. Please help.
-
Make sure your function is introduced to the mission before using it. Best place is the init.sqs:
AngleFacing=preprocessFile "AngleFacingDiff.sqf"
:)
-
Ive done that already, and i did mention that in the OP.