Home   Help Search Login Register  

Author Topic: STREET LAMPS  (Read 1335 times)

0 Members and 1 Guest are viewing this topic.

WELSH ASSASSIN

  • Guest
STREET LAMPS
« on: 08 Aug 2004, 14:13:00 »
How do I switch on standard street lamps?

Thanks

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:STREET LAMPS
« Reply #1 on: 08 Aug 2004, 14:19:25 »
From the Command Reference:

lamppost switchLight mode

e.g.

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

or

object 159582 switchlight "on"

Object ID's can been seen in the editor when you zoom in very close and have 'Show Id's selected (Resistance only).  Only for objects that are part of the island, it will not work for objects placed with the editor.

Mode may be "ON", "OFF", "AUTO". "AUTO" is default, lampost is on only during night time.


If the Lamp is 'fire' based simulation then:

this inflame true


Planck
« Last Edit: 08 Aug 2004, 14:21:20 by Planck »
I know a little about a lot, and a lot about a little.

WELSH ASSASSIN

  • Guest
Re:STREET LAMPS
« Reply #2 on: 08 Aug 2004, 15:07:04 »
sorry dude.

You'll ave to tell me exactly where to put this line of text because I'm having some problems....lol

Ive put the streetlamp2 into my map.  Located it in my Mission.sqm.......What next?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:STREET LAMPS
« Reply #3 on: 08 Aug 2004, 16:00:56 »
Code can go in the init field of a unit, in a script or other file, waypoint, trigger .... where it goes is up to you and depends on the particular circumstances.

Read Abuu's Editing Tutorial and Johan Gustafsson's Scripting Tutorial.
Plenty of reviewed ArmA missions for you to play

Offline Pellejones

  • Members
  • *
  • Yes, well... what?
Re:STREET LAMPS
« Reply #4 on: 08 Aug 2004, 17:29:17 »
ok here's an example.

Say that your lamp has ID 58834.
Just do the following:

1) Add a trigger with these specs. (leave everything else as it is on the trigger)

Axis a: 10000
Axis b: 10000
Activation: anyone
On Activation: (object 58834) switchlight "ON"

That way the trigger is big enough to cover the entire map, and the "Activation: Anyone" tells you that any player/AI in the game will trigger the trigger ("activate it")

The "On Activation:" field tells you what will happen when the trigger is activated (when someones enters the triggers area). This will happen automatically because the trigger covers the entire map.

So, this little example will turn on the lamp, and it will always be on. I suppose you can change the On Activation: (object 58834) switchlight "ON" to "AUTO" instead, and that way it will turn itself on when the time is right (when darkness comes crawling).

Another way to do it is this:

1) On your players INIT field, place this:
On Activation: (object 58834) switchlight "ON"

The AUTO instead of ON works on this one as well.

The nice thing about the first way (the trigger way) is that you can choose when the light will go on. If you make the trigger, say 20x20, and place it near a house. The light (let's say that the street light is next to the house) will turn on when you go near the house.

I hoped this helped.

WELSH ASSASSIN

  • Guest
Re:STREET LAMPS
« Reply #5 on: 08 Aug 2004, 19:34:28 »
thanks for your help guys.  Still not working. I got the ID from the mission SQM.

That didnt work, so i tried the trigger version.  that didnt work.

Anything else?


Offline Pellejones

  • Members
  • *
  • Yes, well... what?
Re:STREET LAMPS
« Reply #6 on: 08 Aug 2004, 19:49:55 »
thanks for your help guys.  Still not working. I got the ID from the mission SQM.

That didnt work, so i tried the trigger version.  that didnt work.

Anything else?

Try getting the ID from within the editor (just press the SHOW ID button and zooooooom in alot) then try it again

WELSH ASSASSIN

  • Guest
Re:STREET LAMPS
« Reply #7 on: 08 Aug 2004, 19:51:53 »
You cant get an ID from an object inserted into a map, only existing objects.  Any other ideas?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:STREET LAMPS
« Reply #8 on: 08 Aug 2004, 20:16:28 »
If its an object you placed yourself then use whatever name you gave it.

If its an addon streetlight it might try

objectName inflame true

like a fireplace.
Plenty of reviewed ArmA missions for you to play

WELSH ASSASSIN

  • Guest
Re:STREET LAMPS
« Reply #9 on: 08 Aug 2004, 20:47:53 »
Right, I called the object LAMP and typed the following into the INIT:

LAMP switchlight "AUTO"

The light came on, but appeared halfway down the post.  I know u  can set heights on individual objects but not characteristics of an object.  Plus, the editor doesnt appear to like the script.....it crashes to desktop when u try to continue editing.

Thanks.
« Last Edit: 08 Aug 2004, 20:48:20 by WELSH ASSASSIN »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:STREET LAMPS
« Reply #10 on: 08 Aug 2004, 21:34:07 »
I recommend instead:

LAMP inflame true

or

this inflame true

And use a different model


Planck
« Last Edit: 08 Aug 2004, 21:42:08 by Planck »
I know a little about a lot, and a lot about a little.

olseric

  • Guest
Re:STREET LAMPS
« Reply #11 on: 08 Aug 2004, 21:45:23 »
The streetlamps that are extracted from the editorupdate have an error in them that does that.

There is one out there that works correctly using the inflame command, however, off the top of my head, I don't know which one.

Also, there is a streetlight add-on available that uses the inflame command.