OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: snoopy22 on 26 Nov 2007, 23:48:34

Title: Lights in humvee to flicker
Post by: snoopy22 on 26 Nov 2007, 23:48:34
 How do you get the headlights in a Humvee to flicker, when you have a game logic in it.  I checked the search tool which led me to a script, which I still dont understand what to do:

http://www.ofpec.com/forum/index.php?topic=25759.0

Sorry this is my second post in only 2 days :( I do know or am learning alot from the editor though!
Title: Re: Lights in humvee to flicker
Post by: Spooner on 27 Nov 2007, 01:12:30
That script was for turning lamp-posts on and off. Not the same as vehicle lights. For a "logic" that you've put in the driver seat of "humvee":
Code: [Select]
while {true} do
{
    logic setBehaviour "safe"; // Lights won't stay on unless "safe" or "careless"
    humvee action ["LIGHTON", humvee];
    sleep 1;

    logic setBehavior "combat"; // Lights won't stay off if "safe" or "careless"
    humvee action ["LIGHTOFF", humvee];
    sleep 1;
};

Try searching for "LIGHTON" and "LIGHTOFF" (I know, searching never helps unless you know what exactly to search for) and there seem to be several discussions about lights, but not specifically about flickering.
Title: Re: Lights in humvee to flicker
Post by: snoopy22 on 27 Nov 2007, 05:33:09
ok thanks a bunch spooner  :good:
Title: Re: Lights in humvee to flicker
Post by: Denz on 28 Nov 2007, 18:50:46
I'm not sure what kind of effect you are looking for but a long time ago for a cutscene I wanted the appearance of a truck signalling a supply drop.
This is how I accomplished it. Right back to basics here  :D
Code: [Select]
truck setbehaviour "careless"
~0.6
truck setbehaviour "stealth"
~0.6
truck setbehaviour "careless"
~0.6
truck setbehaviour "stealth"
~0.6
truck setbehaviour "careless"
~0.6
truck setbehaviour "stealth"
~0.6
exit
I'm not sure what the effect would be like with a smaller time delay. It did create a nice strobe effect though.