OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: MajorHurt on 30 Jun 2010, 21:21:37

Title: A Question on Lighting, and a Bigger Dilemma
Post by: MajorHurt on 30 Jun 2010, 21:21:37
Sorry if this has been addressed elsewhere, but I haven't seen it in my searches:

Is there any way to place a lamp or lantern or some other functioning (and realistic) light source in an added building object, such as WarfareBDepot?

Seems like a simple thing, but I can't seem to locate any info on how to do it, or whether or not it's even possible.

Also, is it even worth it to start pissing about with ArmA editing when ArmA 2 is out?

Any guidance with regard to these questions is greatly appreciated.

Cheers,
MH
Title: Re: A Question on Lighting, and a Bigger Dilemma
Post by: CH on 30 Jun 2010, 23:12:03
...is it even worth it to start pissing about with ArmA editing when ArmA 2 is out?
:dunno:

Is there any way to place a lamp or lantern or some other functioning (and realistic) light source in an added building object, such as WarfareBDepot?
Place a road cone (or another object) somewhere on the map and run this code:

Code: (CreateLamp.sqs) [Select]
_cone = _this select 0

_lamp = "Land_lampa_ind_b" createVehicle getPos _cone

deleteVehicle _cone

Of course you can choose a different type of lamp if you want to.

PS If you find a way to rotate the lamp model and the light, please let me know  :scratch:
Title: Re: A Question on Lighting, and a Bigger Dilemma
Post by: MajorHurt on 30 Jun 2010, 23:30:43
I'll give it a shot. Much appreciated. :)

Yeah, I just got started messing about with righteous OFP editing when ArmA came out, now history seems to be repeating itself.  :dunno:
Title: Re: A Question on Lighting, and a Bigger Dilemma
Post by: savedbygrace on 01 Jul 2010, 00:30:17
The only difference is that OFP is still thriving.
@CH
Can you not use the local variable of the lamp you created to set the direction?
Code: [Select]
_lamp setdir 180
Title: Re: A Question on Lighting, and a Bigger Dilemma
Post by: MajorHurt on 01 Jul 2010, 15:16:30
Didn't they have table lamps/lanterns in OFP?

Both scripts work, but the street light just looks silly in that depot.

Maybe I don't need it.  :dunno:

Thanks for the help guys.

-MH
Title: Re: A Question on Lighting, and a Bigger Dilemma
Post by: savedbygrace on 01 Jul 2010, 16:23:46
They do have lights of various types for OFP but they are addons (though small in size). One was called "Real lights", the other comes with the editor Upgrade 103 by Mikero (not sure if the other updates have them). But most house models allow the light to pass through the walls, making it look, as you say, silly.
Title: Re: A Question on Lighting, and a Bigger Dilemma
Post by: CH on 03 Jul 2010, 00:05:19
Can you not use the local variable of the lamp you created to set the direction?
If you use “setDir“, the 3D-model rotates but the light source doesn’t, and If you use “setPos” the 3D-model disappears. So you can’t use “setDir“ alone and you can’t use “setDir” and “setPos” together to rotate the lamp around the light source either.
Title: Re: A Question on Lighting, and a Bigger Dilemma
Post by: savedbygrace on 03 Jul 2010, 05:56:01
That's very interesting actually. It works great in OFP (using an editor upgrade as the source), I wonder if the same would happen if created using the BIS directory.