OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SimonWolf on 02 Jul 2004, 12:49:24

Title: Intro, seen trough Night Vision/binocular
Post by: SimonWolf on 02 Jul 2004, 12:49:24
Hi,

i am relativly new to scripting and maybe this one is kind of easy, but i cannot figure out how to do it:

I have vreated a camera, loooking down on a boat, i am using

Quote
cutrsc ["binocular","PLAIN DOWN",0]

now i would like to have night vision (cauze it is kind of dark at 2 in the morning with a storm overhead), is there any (pref. easy) way to do that?

Simon

this Site is realy great, although its a bit slow to me, i so far found answers on absolutly every question i have (and much more i did not think of yet)
Title: Re:Intro, seen trough Night Vision/binocular
Post by: ponq on 02 Jul 2004, 14:18:19
When you want the nv googles turned on  have these lines in your script:
Code: [Select]
IF ("NVGoggles" in (weapons player)) THEN {_hasNVG=true;} ELSE {player addWeapon "NVGoggles";}

player action ["NVGoggles"]

When you want to turn it off again:

Code: [Select]
? !(_hasNVG): player removeWeapon "NVGoggles"
Title: Re:Intro, seen trough Night Vision/binocular
Post by: SimonWolf on 02 Jul 2004, 14:53:12
thx, as a matter of fact it did not work until I gave the player character in the intro scene NVGoggles, but anyway, now it qorks and looks just fine, so thx for your help.

Simon

Edit:  ::) don't ask me, i must be sleeping or something  ::) your statement is just fine,  I just need to think about identifiers and variables a bit more