Jump to content
Sign in to follow this  
Hovis

Turning On Street Lights

Recommended Posts

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?

Share this post


Link to post
Share on other sites

oh i thought you meant seach lights.. i need glasses tounge2.gif

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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 smile_o.gif

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
The mission is set in Paraiso. None of the lights are on in my night missions. It's odd. huh.gif

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".

Share this post


Link to post
Share on other sites

There are no streetlamps in Paraiso.

True capital smile_o.gif

Share this post


Link to post
Share on other sites

No lights in Paraiso?!?!

D'OH!

Well thanks for the help anyway fellas. smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×