Jump to content
lexx

Switching between optic modes in vehicles

Recommended Posts

Oi, people.

 

What I want to do is starting out in optics mode (player switchCamera "GUNNER") with either night vision or thermal visions on and so far I can't find a way to do that.

 

With currentVisionMode I can get the current vision mode (as the name implies), but is there any way to switch the current vision mode to something else? Is that even possible to do?

Tried a couple things, but it all seems to be related to newly created camera objects, not the vehicle / gunner optics.

Share this post


Link to post
Share on other sites
3 hours ago, lexx said:

starting out in optics mode (player switchCamera "GUNNER") with either night vision or thermal visions

 

Hello there lexx !

 

I remmber that there is another thread that i had also reply and i 'll try to search this , but if i remmeber there was no given solution !

 

Don't get dissapointed though !

I 'll try to check it. !

Share this post


Link to post
Share on other sites

Hey, thanks for the reply. Sadly the nvGoggles action is only for the NVG that players / npcs are wearing. Don't think there's any fitting action for the vehicle vision mode, at least nothing obvious to me.

  • Like 1

Share this post


Link to post
Share on other sites

Had the idea for a workaround: Fetching the assigned key and then "pressing" it via game. Getting the action is easy:

_key = actionKeys "nightvision";

 

... now the question is, can I tell the game to trigger that key?

Share this post


Link to post
Share on other sites

But actionKeys is just returning a value, it doesn't trigger said key. Thus, the code above does nothing except assigning a value to the _key variable.

Share this post


Link to post
Share on other sites
28 minutes ago, lexx said:

But actionKeys is just returning a value, it doesn't trigger said key

 

To be honest i did't notice !

Share this post


Link to post
Share on other sites
12 minutes ago, pierremgi said:

Not at all, I'm afraid.

 

Yes but for another time you are giving a solution !

 

Pierre , i 'm following your examples and posts before even be part of this community and i will never forget this :

 

 

. . . It's all about how to use the code for your own needs !  :thumb:

  • Like 1

Share this post


Link to post
Share on other sites
44 minutes ago, pierremgi said:

For vehicle, use disableNVGEquipment and disableTIEquipment .

 

I want to start the mission with a specific vision mode activated. The mentioned commands will just disable them, unless I'm missing something here.

Share this post


Link to post
Share on other sites
3 hours ago, lexx said:

 

I want to start the mission with a specific vision mode activated. The mentioned commands will just disable them, unless I'm missing something here.

Ah OK, perhaps you need to use:

[vehicle player,2] call BIS_fnc_camera_setVisionMode // 1 = NVG, 2= TI

but be sure player is defined (initPlayerLocal.sqf) and perhaps force gunner view. Not tested

Share this post


Link to post
Share on other sites

Thanks, probably should have checked the function list first.

 

Sadly it still doesn't work... or I'm using it wrong. Taking your example while being in vehicle gunner optics (or anywhere else), nothing happens.

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

×