OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Namo on 02 Apr 2003, 19:35:52

Title: How do I make a street lamp light on?
Post by: Namo on 02 Apr 2003, 19:35:52
?
Title: Re:How do I make a street lamp light on?
Post by: macguba on 02 Apr 2003, 19:41:41
lamppost switchLight mode
Operand types:
    lamppost: Object
    mode: String
Type of returned value:
    Nothing
Description:
    Controls lamppost mode. Mode may be "ON", "OFF", "AUTO". "AUTO" is default, lampost is on only during nighttime.

Example:
    nearestObject [player, "StreetLamp"] switchLight "Off"
Title: Re:How do I make a street lamp light on?
Post by: Namo on 02 Apr 2003, 19:45:03
Ok cool, now where do I put that? in init?
Title: Re:How do I make a street lamp light on?
Post by: macguba on 02 Apr 2003, 19:53:21
Whereever you like.   From a quick recce it appears that streetlamps do not appear on the map, but they do have ID numbers.    So find out the ID of your lamp and put

object 1234 switchLight "On"

in your init.sqs as you said.   Or in On Activation field of a trigger, if it happens during the mission.    Or a waypoint.

All code can go in script files, triggers, waypoints, init fields ... whereever is most convenient for you.  


Edit:   just because I didn't say "syntax not guaranteed" doesn't mean it is.   NEVER trust my syntax, always check it in the command ref.  ;)
Title: Re:How do I make a street lamp light on?
Post by: Namo on 02 Apr 2003, 20:00:17
I don't understand man.

I made the streetlamp, then I put   this switchlight "on" in the init and it didn't work.
Title: Re:How do I make a street lamp light on?
Post by: qwertyuio on 02 Apr 2003, 20:30:18
Hey mate, I think what macguba wrote was a bit confusing.

To put a street light on, in its init field, type "this inflame true" , but without the quotes.

I hope I have solved your query.
Title: Re:How do I make a street lamp light on?
Post by: headshot_snipe on 02 Apr 2003, 20:34:40
yeah, that will light it

you can put "true" when you want it on
and "false" when you want it off

this inflame true

this line will put your lamp on.

what macguba was trying to tell you is if you want a lamp that is already inserted in the map (smtimes around villages) you need to get its ID (press the ID button (res only)) and write:

object whateverthenumberis switchlight on (you can try inflame true) in a trigger

and the lamp will turn on. i think that the real point that macguba was trying to tell you is that you can have all of this info in the command ref. under the editors depot.  ;)

read the top post of this section and you will find it.  8)
 
Title: Re:How do I make a street lamp light on?
Post by: Namo on 02 Apr 2003, 20:38:23
Kool thanks everyone I will try it now, just re installed.
Title: Re:How do I make a street lamp light on?
Post by: Namo on 02 Apr 2003, 20:57:01
eeeeeeeeeeeeggggcellent.

Title: Re: How do I make a street lamp light on?
Post by: Thypoon on 03 Jun 2007, 17:51:12
hmm.. dont work.. :(
Title: Re: How do I make a street lamp light on?
Post by: h- on 03 Jun 2007, 23:11:40
Namo, do not double post.

If you have something to add to your post after a short period of time (we'd prefer that about 3 days should pass), edit your post instead of replying to yourself.


Yes yes, I'm a dumbass..  ::)
Title: Re: How do I make a street lamp light on?
Post by: SEAL84 on 04 Jun 2007, 02:26:36
He double-posted four years ago :P
Title: Re: How do I make a street lamp light on?
Post by: h- on 04 Jun 2007, 17:39:53
 :D  :D  :whistle:

Maybe I really really should try to visit here when I actually have the time to focus on the things I'm supposed to do :no:

And maybe people should not dig up threads o' ancient..  :scratch:
Title: Re: How do I make a street lamp light on?
Post by: macguba on 04 Jun 2007, 20:21:02
Indeed.    :D

Thypoon, yes it does work.  ;)  We can't help you if you don't tell us anything about the problem.   What are you trying to achieve?   What did you do?   What happened?   How do you know it didn't work?