Home   Help Search Login Register  

Author Topic: NV goggles  (Read 731 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
NV goggles
« on: 28 Oct 2003, 01:07:39 »
How can I make the NV goggles layer appear without having an actor (unit) that carry the goggles?

With other words is there something like :

cutrsc ["NVgoggles","Plain"]
or
cutobj ["NVgoggles","plain"]

that doesn't work..., but is there an other way?

Search or search or search before you ask.

Komuna

  • Guest
Re:NV goggles
« Reply #1 on: 28 Oct 2003, 14:58:01 »
The nvg effect can only be achieved through the UnitCarryingNVG switchCamera "INTERNAL" method.
However, the optics model is available at the data3D directory and can be configured in the description.ext - resouce overlay. I'm sure you want the first option, so, good luck... :P :-\

Well, if you want to toggle the NVG effect on and off, without using switchCamera all the time, you have the action "NVGoggles":

UnitCarryingNVG action ["NVGoggles"]

Offline Blanco

  • Former Staff
  • ****
Re:NV goggles
« Reply #2 on: 28 Oct 2003, 23:44:48 »
hmmm, that a pity...

The reason I need that without a unit carrying the goggles is because I want to use Vectorbosson's great satelite script and I want so everytime you use the satelite the NVgoggles layer appears.
So I can't use switchcamera because when I use that I see what that unit sees, I have to see the sateliteview.

It's a stealth (dusk) mission, normaly the player should chose the NVgoggles during the briefing, but what if he don't? The satelite is useless without one...

I know how to make a resource overlay but I don't know where to look...








Search or search or search before you ask.

Komuna

  • Guest
Re:NV goggles
« Reply #3 on: 29 Oct 2003, 10:54:19 »
Oh! I see what you mean! I had the same idea, but I'm too lazy to make satellite simul script, though they're not a big deal...

When you 'switchCamera', indeed, you'll see what the unit's seeing. However, if you use the command < SatelliteCameraName cameraEffect ["Internal","BACK"] >, the unit view will be overlayed, yet still remaining the NVG effect! Of course, you'll need to modify the original script.

Instead of having a unit carrying the Gog's, do the following:

Code: [Select]
_hasNvg=false

IF ("NVGoggles" in (weapons player)) THEN {_hasNVG=true;} ELSE {player addWeapon "NVGoggles";}

player action ["NVGoggles"]

@< Wait until the sat view is off : variable >

? !(_hasNVG): player removeWeapon "NVGoggles"

exit

Of course, the player will have the possibility of removing the effect if he removes the NVG by pressing "N"... ::)

C U
« Last Edit: 29 Oct 2003, 10:56:05 by Komuna »

Offline Blanco

  • Former Staff
  • ****
Re:NV goggles
« Reply #4 on: 29 Oct 2003, 16:40:18 »
yes, yes, thats what I need... thank you very much!

Quote
Of course, the player will have the possibility of removing the effect if he removes the NVG by pressing "N"...

No, the player can't remove the NV -goggles during the sateliteview (dialog), so there no problem with that.

But I think you can't force the player to use the goggles with...

Player action ["NV goggles"]

You are in control...





« Last Edit: 29 Oct 2003, 16:42:22 by Blanco »
Search or search or search before you ask.

Komuna

  • Guest
Re:NV goggles
« Reply #5 on: 29 Oct 2003, 17:04:44 »
No, what I meant was that if you don't use the 'switchCamera "VIEW"' you can force the player to put on his goggles (it works, as I've already tried that) while the camera's running, which activates the NV effect. So, as the player has the control, he can remove the effect. However, if you use the effect with another unit, the player won't have such ability of removing his gog's.

Offline Blanco

  • Former Staff
  • ****
Re:NV goggles
« Reply #6 on: 30 Oct 2003, 20:43:23 »
It works. There were still some things but you put me in the right direction, Komuna.

Player action ["NV goggles"] works as a toggle (ON/OFF) and when a player has the NVG on, he switches it off when the camera rolls, so I had to remove it first and add it again to bring it in default phase (OFF) before satelite activation
AFAIK there's no command that checks if a player's NVG's is or off..., so I did it that way.

I also needed a bolean (hasNVG) in the init.sqs to define if the player got a NVG at the start of the mission and one local variable _stillhaveNVG to check if he still got it or not.

I'm not a kickass scripter, maybe I made it myself difficult

Anyways, it works now, thx Komuna.

The things I changed/added (Vectorbosson's satilite)

- Satelite activation with (add)action instead of via radio  
- start position was player position, now you can choose the area you want to scan via mapsingleclick.
- Nightvision layer apears when you use the satelite, even if the player don't carry one. It also apears when it's daytime, maybe I change it later. I only changed it to fit my mission.

I can't attach it cos it's too big and I don't have any webspace, but if you're interesed give me a sign at ftielemans@extra-logistics.be & I send it to you.(but not today)







 
« Last Edit: 30 Oct 2003, 20:45:27 by Blanco »
Search or search or search before you ask.

Offline Blanco

  • Former Staff
  • ****
Re:NV goggles
« Reply #7 on: 10 Nov 2003, 22:35:14 »
it's time to solve this...
Search or search or search before you ask.