Results 1 to 10 of 10

  Click here to go to the first Developer post in this thread.  

Thread: Turning On Street Lights

  1. #1
    So I'm looking to set a mission in a city at night, lit by street lights. I searched the forum and found a section on switching lights off, which yielded the following Init command.

    {_x switchlight "off"} foreach (position lighto1 nearObjects ["streetlamp",300]);

    So I create a game logic called lighto1, change the switchlight from "off" to "on" and have a go. Still darkness.

    Could somebody please tell me what am I doing wrong?

  2. #2

  3. #3
    oh i thought you meant seach lights.. i need glasses

  4. #4
    Sergeant Major 5133p39's Avatar
    Join Date
    Feb 2 2004
    Location
    Czech Republic
    Posts
    1,417
    Quote Originally Posted by (Hovis @ Mar. 14 2007,03:48)
    So I'm looking to set a mission in a city at night, lit by street lights. I searched the forum and found a section on switching lights off, which yielded the following Init command.

    {_x switchlight "off"} foreach (position lighto1 nearObjects ["streetlamp",300]);

    So I create a game logic called lighto1, change the switchlight from "off" to "on" and have a go. Still darkness.

    Could somebody please tell me what am I doing wrong?
    First of all, your command is ok, and it works - in a way.
    You need to know how these lights work in ArmA:
    The lights are automatically turned ON around 19:00 or so (i don't know the exact time, and bear in mind that it could even depend on the season of year).
    Now if you try to switch ON the lights BEFORE this time of day - it will still work (the lightIsOn on these lamps will return "ON") but you won't see the effect.

    Try setting mission time to later hours, or change the season to winter (in winter it should be dark sooner which could maybe allow you to see the effects).

    edit: in case it doesn't work in MP, it could be that the effect of switchLight command is local - which would mean that the light is switched only on the machine where the lamp is local, which should be the server. I am not saying that it IS local, i am just speculating that it COULD BE.



    MSI P55-GD65 | Core i5 750 @ 2.67GHz | 4GB DDR3 | ATI HD 5970 (Asus EAH5970​/G​/2DIS​/2GD5) | OCZ Revo 120GB PCIe SSD | 2x OCZ Vertex 4 120GB |
    Windows 7 64bit Home Premium | Catalysts 13.1 | ArmA2 OA 1.62.0.101480 (beta) +BAF +PMC +ACR | ArmA2 1.11.0.86734 | ArmA 1.18.0.5281 | OFP 1.0.0.96

    Be smart, use Sprocket!

  5. #5
    The mission is set at midnight, and it's a multiplayer job (not sure if that will affect things, but it has done so in the past). I'll have to see if the lights are on when I try the mission out live I suppose. In the meantime I've resorted to using fires cunningly concealed in vehicle wrecks and exploding vehicles. It just really needs to provide enough light to enable the players to make their first kills and get some nightvision of their own.

    Thanks for the help by the way

  6. #6
    Sergeant Major 5133p39's Avatar
    Join Date
    Feb 2 2004
    Location
    Czech Republic
    Posts
    1,417
    you are welcome.
    Since you mentioned MP environment, then that is probably the cause.
    But it is very strange that the lights are OFF by default?!
    They should be ON until you switch them off, or until its day again.
    ...where is the mission taking place? maybe the lamps there are of some type which cannot be lit ? (not that i know about such lamps in ArmA).

    If you try a new and clean mission in the editor, with only a player, and no scripts etc., are the lights on?

  7. #7
    The mission is set in Paraiso. None of the lights are on in my night missions. It's odd.

  8. #8
    Sergeant Major 5133p39's Avatar
    Join Date
    Feb 2 2004
    Location
    Czech Republic
    Posts
    1,417
    Quote Originally Posted by (Hovis @ Mar. 14 2007,17:43)
    The mission is set in Paraiso. None of the lights are on in my night missions. It's odd.
    PARAISO?!
    Oh man :-))))))) Aren't you joking?
    There is NOT A SINGLE LAMP in Paraiso! :-)
    There are only semaphor lights (which doesn't work).

    ...or are you using some editor addon, which makes the lamps available for placing in the mission editor?
    If that is the case, then i would suggest you check the class name of these addon lamps - it's probably different than the "streetlamp".

  9.   This is the last Developer post in this thread.   #9
    There are no streetlamps in Paraiso.

    True capital

  10. #10
    No lights in Paraiso?!?!

    D'OH!

    Well thanks for the help anyway fellas.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •