Home   Help Search Login Register  

Author Topic: Lights off  (Read 617 times)

0 Members and 1 Guest are viewing this topic.

Smoshy

  • Guest
Lights off
« on: 27 Jul 2004, 06:01:38 »
I have an empty anti tank gun crewed by a gunner and commander. I want my mission to take place in the dark but the gun light is always on. I've tried to turn it off by having

gun1 switchlight "off"  in the init field but this just gives me a CTD.

Am I on the right track? Is there a better way to do this?

Thanks in advance.

j-man

  • Guest
Re:Lights off
« Reply #1 on: 27 Jul 2004, 08:31:27 »
use something like:

Code: [Select]
gun1 setBehaviour "STEALTH"

Smoshy

  • Guest
Re:Lights off
« Reply #2 on: 27 Jul 2004, 09:50:51 »
No dice I'm afraid  ???

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Lights off
« Reply #3 on: 27 Jul 2004, 09:57:00 »
It took the community years how to figure out how to turn off the light on the M2 machine gun:   the answer was a fast loop commanding

gun1 action ["lightoff"]

or something.    Search the forum.   It might be in the action thread sticky at the top of this board, check the last couple of posts.
Plenty of reviewed ArmA missions for you to play

Captain Courageous

  • Guest
Re:Lights off
« Reply #4 on: 27 Jul 2004, 11:28:09 »
What AT Gun is it (I'm guessing it's an addon)? And doesn't it work if you put it on 'Aware', 'Combat' or 'Stealth' modes?

DBR_ONIX

  • Guest
Re:Lights off
« Reply #5 on: 27 Jul 2004, 14:10:25 »
Make a sript, lightoff.sqs
Code: [Select]
_unit = driver this select 0
_veh = this select 0
#loop
_unit action ["light off",_veh]
~0.1
GOTO "loop"

And call it with this in it's INIT field ::
[this] exec "lightoff.sqs"

That should work..
If it strobes, lower the ~0.1 to something like ) 0.01
Don't remove it or it crashes the game ::)
- Ben

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Lights off
« Reply #6 on: 27 Jul 2004, 17:09:18 »
I know this might blow yer top if you're not into O2 stuff but the best way is to
leave out the "svetlo" crap (the projector/headlights of vehicles) when tweaking/creating an addon. :)

 :D or try the following little trick, matey :thumbsup:

goto the config.cpp of the weapon and look for stuff like this:


class Reflectors
{
       class Reflector
       {
        color[]={0.900000,0.800000,0.800000,1.000000};
        ambient[]={0.100000,0.100000,0.100000,1.000000};
        position="svetlo";
        direction="konec svetla";
        hitpoint="svetlo";
        selection="svetlo";
        size=0.200000;
        brightness=0.001000;
        };
};


======================

 ;) now, I cant remember what num code is black/dark grey but fiddle with it, m8
ya need to alter the color & the brightness.... you can see color codes by using MS PAINT.
there ya can use a color & then see its code (in numbers)  :-*

hope it solves yer probby there, m8

Smoshy

  • Guest
Re:Lights off
« Reply #7 on: 28 Jul 2004, 02:34:49 »
Just a quick question. Is the name to replace "_veh" in the script the name of the addon itself?