Forum Jump :

Author Message


Posts: 5
Rank:


Level: Member

Country: jm
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2011-07-23 03:18        
     
hello guys i need help i can't switch Lights-On on empty vehicles and other mountable objects? what i did is i create a

Empty>Cars>HMMWV [US]

i put this "this inflame true" under init. but there's nothing happening?

This post was edited by hunterx777 (2011-07-23 03:39, ago)


Author Message

Pirin  



Posts: 1547
Rank:


Level: Member

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 46
In-game name: kylania

 
#2 Posted at 2011-07-23 03:43        
     
unit action ["lightOn", targetVehicle] ;


Advertisement


Author Message


Posts: 5
Rank:


Level: Member

Country: jm
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2011-07-23 04:51        
     
# Pirin :
unit action ["lightOn", targetVehicle] ;

thanks for the reply..but it didn't work i can see the light came from vehicles in half second before the mission starts


Author Message

Pirin  



Posts: 1547
Rank:


Level: Member

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 46
In-game name: kylania

 
#4 Posted at 2011-07-23 05:02        
     
Are there units inside the hmmwvs? If so, they'll turn on or off the lights according to their combat mode. They need to be CARELESS in order to have lights on.


Author Message


Posts: 5
Rank:


Level: Member

Country: jm
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2011-07-23 10:07        
     
actually the HMMWV is empty


Author Message


Posts: 1525
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2011-07-23 15:49        
     
unit action ["lightOn", targetVehicle] ;

It should work, unit needs to be any AI unit or usually just using player will work.

player action ["lightOn", targetVehicle] ;


targetvehicle needs to be the name of the vehicle that you gave it.

Or if the code is placed in the vehicles init you can use this.

player action ["lightOn", this] ;


Author Message


Posts: 5
Rank:


Level: Member

Country: jm
Location:
Occupation:
Age:
In-game name:

 
#7 Posted at 2011-07-24 04:13        
     
player action ["lightOn", this] ;

this one really works thanks man *YAHOO*

one last thing is there a way use addons command? i have cop-car addons when you ride it as driver to the cop-car addon there's a command "LightBar On" this well turn on the lightbar i use the
"player action ["lightbar on", this] ;
but it didn't work?

This post was edited by hunterx777 (2011-07-24 04:25, ago)


Author Message


Posts: 1525
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#8 Posted at 2011-07-24 15:55        
     
Without knowing what the addon is it could be anything.

For the American cop car addon it's this, well that's wat it says I haven't tested it.
 this animate ["policeSirens",1]; this animate ["policeLightbar",1];


Author Message


Posts: 5
Rank:


Level: Member

Country: jm
Location:
Occupation:
Age:
In-game name:

 
#9 Posted at 2011-07-25 23:02        
     
this animate ["policeSirens",1]; this animate ["policeLightbar",1];

it worked! *DRINK* cheers thanks for everything thats all


Author Message

Pirin  



Posts: 1547
Rank:


Level: Member

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 46
In-game name: kylania

 
#10 Posted at 2011-07-25 23:09        
     
Happy sirening! :)


Author Message


Posts: 42
Rank:


Level: Member

Country: uk
Location: bedford
Occupation: gliding
Age: 25
In-game name:

 
#11 Posted at 2011-10-31 20:41        
     
i looked at this and wanted to ask if there was a way to get the car head lights and rear lights to flash on and off like a car alarm


Author Message


Posts: 1525
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#12 Posted at 2011-11-01 00:22        
     
You can sort of. name of police car is cop_car

The lights will only flash when the vehicle empty and stationary.


place in the units init
null=[] spawn {while {alive cop_car} do {if (speed cop_car == 0 and count units cop_car == 0) then { player action ["lighton" ,cop_car];sleep 0.5; player action ["lightoff" ,cop_car] ;sleep 0.5;}}};






Tags: Light, Object, On, Vehicle