Jump to content
Sign in to follow this  
Capjerahya

detect when player is in optics

Recommended Posts

Is there a way to determine if player switch from normal view to optics view and vice versa?

Share this post


Link to post
Share on other sites

I think no one knows. I'll just check Hardrock and Vektorboson's keyinput script which I think is the best solution for this one. My main aim was to tell if player press V mey for optics mode or V again to escape optics.

And I posted this in the wrong section aswell.

Edited by Capjerahya

Share this post


Link to post
Share on other sites
I think no one knows.

Yeah.I'd say that's the main reason you didn't get an answer. :)

I think the same would apply to hooking the user actions too.

Although I couldn't tell you how to achieve it,perhaps Fwatch

could be used?

Share this post


Link to post
Share on other sites

With the eventhandler animchanged introduced in ArmA:CWA (1.99), it's possible to get the anim played by a unit ; such anims (the guy looking through the binoculars) are named "Binoc" when standing, "BinocLying" when lying, "BinocStand" with weapon on back, "BinocCrouch" when crouching. You should be able to build a script checking if one of those actions are played.

Disregard, this was about binoculars while you're looking after using weapon optics. I'm working too much it seems...

Share this post


Link to post
Share on other sites

This is what I use:

if (cameraview == "GUNNER") then {player is using optics}

Share this post


Link to post
Share on other sites
This is what I use:

if (cameraview == "GUNNER") then {player is using optics}

Aint cameraview introduce in A2?

@Maczer, I tried fwatch for it's keypress until I learn you can hook keypress V by creating a camera and check of it is deateyed everytime user press V key.

Share this post


Link to post
Share on other sites
Aint cameraview introduce in A2?

@Maczer, I tried fwatch for it's keypress until I learn you can hook keypress V by creating a camera and check of it is deateyed everytime user press V key.

Oops! Didn't read the full thread path properly. My apologies Capjerahya

Share this post


Link to post
Share on other sites

That didn't go as planned. :p I was trying out some 3d aiming but it's just to impossible to implement it with the animation i'm using. It clips the polygon even though I'm not yet zooming. I'll just make a better 2d optics instead.

Share this post


Link to post
Share on other sites
0.02 exec "..\fwatch\data\[url="http://ofp-faguss.com/fwatch/library/memmulti"]MemMulti.sqs[/url]"

#Loop
~0.02
_view = ([url="http://ofp-faguss.com/fwatch/command/mem_multi"]FWATCH_MEM_MULTI[/url] select 3) select 0
? _view == "GUNNER" : player globalChat "player is using optics"
goto "Loop"

Edited by Faguss

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
Sign in to follow this  

×