Home   Help Search Login Register  

Author Topic: making vehicles start with lights on  (Read 708 times)

0 Members and 1 Guest are viewing this topic.

Offline punisher

  • Members
  • *
making vehicles start with lights on
« on: 14 Dec 2002, 13:19:54 »
hi
does anyone know how to make lights on cars and tanks have their lights on even when nobody is in them ???
The Gimp clan- pushing the limits of OFP
http://www.youtube.com/user/Pigdogmeat

david-p

  • Guest
Re:making vehicles start with lights on
« Reply #1 on: 14 Dec 2002, 15:40:37 »
sorry i havent got time to test this,but i think this may work
u need to name all your cars (eg car1 car2 car3) and a unit, eg unit1. then in a script, try something like
unit1 moveindriver car1
unit1 action ["LIGHTON"]
unit1 moveindriver car2
unit1 action ["LIGHTON"]
and so on. it wont be instant, but should be unnoticeable. if it works at all that is :)
(if u wish to refine the script, u could use an array of vehicles, and use "array1 select X" etc) but thats not necessary, unless u have like 20 vehicles, where it becomes a real drag to Ctrl+V all those lines!

Respined

  • Guest
Re:making vehicles start with lights on
« Reply #2 on: 15 Dec 2002, 13:52:41 »
the better way is to group your cars first.
put this string to all your cars init field
grp = group this
then name your cars like car1,car2,car3
then put the unit get in the car with this string
unit1,or unit2 moveindriver car1, or car2
unit1 action ["LIGHTON"] i think this will work i have tested this once.

b0b

  • Guest
Re:making vehicles start with lights on
« Reply #3 on: 15 Dec 2002, 17:12:58 »
There's an easier way to do it using game logics, if u create a game logic and then move it into the drivers seat, and use the action command to turn the lights on.  but this does mean u have to get rid of th game logic if u want anyone to drive the vehicle.

put this in the inti field of the vehicle:
GameLogic MoveInDriver Jeep ; Jeep action ["LightOn"]

if u want to remover the game logic u can either move it with SetPos or just use :

DeleteVehicle GameLogic

hope that helps