Jump to content

Recommended Posts

I'm trying to set up a task where the SOG team takes a picture of a Mig as part of their mission and the picture taking triggers the task as successful. I used this post as a reference:

https://forums.bohemia.net/forums/topic/157453-mission-take-picture-of-the-tower/?do=findComment&comment=2528585

 

and modified it to use the SoG camera with the prairie fire assets. Unfortunately, it does not seem to work like the original rangefinder.

 

while {true} do {
   private "_id";
   waitUntil {(currentWeapon player == "vn_weapon_camera_01") && {cameraView == "GUNNER"} };
   _id = (findDisplay 46) displayAddEventHandler ["MouseButtonDown",{_nul = execVM "flash.sqf";}]; 

   waitUntil {!(cameraView == "GUNNER")};
   (findDisplay 46) displayRemoveEventHandler ["MouseButtonDown", _id];

if (!isNil "picTaken") then {
	breakTo "MAIN";
};
}; 

and then the flash.sqf

if (cursorObject == miggy) then {
   hint "Got it!";
picTaken = 1;
}; 
flashed = true

But it doesn't work. If I replace the vn_weapon_camera_01 classname with the rangefinder and use that in the mission, it works great. So apparently the "firing" of the camera is different than the rangefinder.

 

Anyone know what to fix?

I also tried putting a fired eventHandler on the mig but was unable to get it working because my knowsAbout = .1 at best.

 

If anyone could suggest a solution either with the top  part or a fired eventHandler, that would be helpful.

 

Thank you,

 

RR

 

*edit: I also tried cursorTarget instead of cursorObject with the same effect

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×