Home   Help Search Login Register  

Author Topic: Street Lights need to be turned off  (Read 2768 times)

0 Members and 1 Guest are viewing this topic.

Offline Jffsieg

  • Members
  • *
Street Lights need to be turned off
« on: 19 May 2007, 07:00:48 »
Is it possible to turn off the street lights in Sahrani?

 ???

Offline Willus_Killus

  • Members
  • *
Re: Street Lights need to be turned off
« Reply #1 on: 19 May 2007, 11:55:05 »
probably but i couldent tell u how m8 will be something 2 do with "nearestobject" and its ID and stuff

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Street Lights need to be turned off
« Reply #2 on: 20 May 2007, 13:29:10 »
And where did you find any street light there? Was checking several towns and cities (3:30 am), not a single lightpost in any of them  :blink:

Offline Jffsieg

  • Members
  • *
Re: Street Lights need to be turned off
« Reply #3 on: 20 May 2007, 19:40:02 »
there are street lights in everytown

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Street Lights need to be turned off
« Reply #4 on: 20 May 2007, 19:47:05 »
Give the name of a town and the placement of them so I can locate them. May be there are too few, may be they are too weak, but the case is that I'm missing them (except a few quite weak ones over bridges).

Offline Jffsieg

  • Members
  • *
Re: Street Lights need to be turned off
« Reply #5 on: 21 May 2007, 01:31:10 »
Corazol has them, just past the building past the first bridge if you enter for the south's side.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Street Lights need to be turned off
« Reply #6 on: 22 May 2007, 16:36:24 »
Check the FAQ here. Should still apply to ArmA.
urp!

Offline genji

  • Members
  • *
Re: Street Lights need to be turned off
« Reply #7 on: 25 May 2007, 00:08:42 »
Check the FAQ here. Should still apply to ArmA.

Code: [Select]
(object12345) switchLight "off"
or maybe even

Code: [Select]
ID12345 switchLight "off"
but still its not working  :(
can anyone get this to work?


Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Street Lights need to be turned off
« Reply #8 on: 25 May 2007, 01:05:37 »
Code: [Select]
// lightsoff.sqf
_pos    = _this select 0;
_range = _this select 1;

// Add more types if needed
_types = ["Land_lampa_vysoka", "Land_lampa_ind", "Land_lampa_ind_b", "Land_lampa_sidl", "Land_lampa_ind_zebr"];
for [{_i=0},{_i < (count _types)},{_i=_i+1}] do
{
   _lamps = _pos nearObjects [_types select _i, _range];
   Sleep 1;
   {_x switchLight "OFF"} forEach _lamps;
};

For example:
Code: [Select]
res=[getPos player, 3000]execVM"lightsoff.sqf"

Offline genji

  • Members
  • *
Re: Street Lights need to be turned off
« Reply #9 on: 26 May 2007, 17:19:57 »
Thankyou Mandoble  :clap:
im really learning a lot from you guys on these ace forums

now why couldnt i think of that  :D
« Last Edit: 26 May 2007, 17:25:02 by genji »