OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Smoshy 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.
-
use something like:
gun1 setBehaviour "STEALTH"
-
No dice I'm afraid ???
-
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.
-
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?
-
Make a sript, lightoff.sqs
_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
-
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
-
Just a quick question. Is the name to replace "_veh" in the script the name of the addon itself?