Jump to content
Sign in to follow this  
dkraver

Streetlamps

Recommended Posts

What do i write in ini field to have a streetlamp turned on

Share this post


Link to post
Share on other sites

Thought that only worked for fires, how would you place, or light a streetlight?

For a fire I'd place it as a unit and then in the init field type the - this inflame true - statement. How does it work for fixed lights?

Cheers! smile.gif

Share this post


Link to post
Share on other sites

Fenris, you have download them, it was an addon they used to have at OFP Ed Center. It may be in Kegetys object files now. Otherwise, I dunno where you can get it.

Raver, I'm gonna try it now and get back 2 u.

Share this post


Link to post
Share on other sites

The commands that work with the streetlights are lightIsOn and switchLight.

Ex:

? lightIsOn nearestObject [player, "StreetLamp"] == "OFF"

nearestObject [player, "StreetLamp"] switchLight "OFF"

This is as described in the official command reference.

BTW, changing the lamp state in-game is a little slow, so give it a minute if the light doesn't turn on instantly.

- PlaneShifter -

(Edited by PlaneShifter at 11:33 pm on Nov. 26, 2001)

Share this post


Link to post
Share on other sites

DKraver,

Whats your email address?

I'll send them to you.

I think there's three kinds: streetlamp-white, red, and green.

Share this post


Link to post
Share on other sites

planeshifter i tried both and nothing works. The line with lightison says there are missing = and with other one nothing happends at all.

Share this post


Link to post
Share on other sites

If you're talking about street lamps that are there already, they are set to 'Auto' they have a light sensetive diode, that automatically turns the light on when it goes dark.

If you want to explicitly turn on/off a lamp post, create a 'Game Logic' object near the lamp post and in it's init field, place: (copied from command reference)

nearestObject [player, "StreetLamp"] switchLight "Off"

this turns the nearest lamp post off.

Change "Off" to "On" to turn it back on.

Methinks this is the kind of thing that the Game Logic is for - for executing commands and scripts as soon as the mission starts, rather than using a trigger with some wierd way of automatically setting it off...

Share this post


Link to post
Share on other sites

Game logic is used mainly to determine the server computer -- if the game logic unit is local, then the computer is the server.

To make a trigger that goes off at the start of the mission, set its condition to "true".

BTW, the streetlight will appear off during the day, no matter what. There is no way (that I know of) to make a streetlight appear to be on during daylight hours.

- PlaneShifter -

(Edited by PlaneShifter at 6:41 am on Nov. 30, 2001)

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  

×