Jump to content

Recommended Posts

Posted

Does anyone know how to get lights working? I know I have the connectors set up properly because the AI is able to turn all of the lights on, but when I take control of the airplane, something outside of my EFM and lua (I think) is forcing the light arguments to 0. Hardcoding the light args to 1 in the EFM just makes the light sprites flicker without emitting light.

 

Are there other commands or parameters that need to be set before turning the lights on?

[sIGPIC][/sIGPIC]

Posted

I've seen this, but only across multiplayer. Use the default arguments for the lights and try again. There is some scripting that needs to be done in the aircraft LUA as well. I'm sure you have a template to reference for that, if not let me know.

Posted (edited)
I'm sure you have a template to reference for that, if not let me know.
I am using the Wudnerluft template, specifically the section on lights_data. I have tried enabling the lights through keyboard input, setting the draw arguments, and and iterating through all parameters in the game. It still only works when the plane is AI controlled. I have also determined this is not working with SFM either.

 

Here is a reduced version of the lua (which has the same problem). I am using the default args 208 and 209 here. This is also consistent with the content of Lights.lua

lights_data = {
	typename = "collection",
lights = {
	[2] = { typename = "collection",
	lights = 	{		 
				{
					typename = "spotlight",
					 connector = "MAIN_SPOT_PTR_02",
					argument = 209,
					dir_correction = {elevation = math.rad(-1)}
				},
				{-- Landing/Taxi light
					typename = "spotlight",
					connector = "MAIN_SPOT_PTR_01",
					argument = 208,
					dir_correction = {elevation = math.rad(3)}
				 }
			}
		}
	}
},

 

Is there something else I need to do that I am missing, or should that work?

Edited by VincentLaw

[sIGPIC][/sIGPIC]

Posted (edited)

I just dropped my model directly into an unmodified copy of the Wunderluft and it does the same thing. I guess my problem boils down to: What is wrong with (or missing from) the Wunderluft that prevents lights from working unless it is AI controlled.

 

all of my connectors are correctly named for Wunderluft.lua.

Edited by VincentLaw

[sIGPIC][/sIGPIC]

Posted

pretty sure that the flyable aircraft clone what you use for your model cant use arg208 and/or arg 209, however ai can

is that an f-15 or a su-27 ?

f-15c/e use arg 209 both for taxi and landing light with values 0.5 and 1.0

su-27 does the same but with arg208

i will able to help you only if you tell the external model name what you would like to use (or your individual model - which args are used for lighting and which values)

and you will need to tell too, which cockpit would you like to use

sign-pic4.jpg

Posted (edited)

I guess I didn't make it clear. I have custom .edm models for both the cockpit and external model. I am not using default models. I have connectors in the external .edm with the correct names and user defined property. Based on my testing, the problem does not appear associated with the 3d model.

 

Arguments 208 and 209 were the default Wunderluft taxi and landing lights, so I used those arguments, but I don't really care which arguments I use as long as something works.

Edited by VincentLaw

[sIGPIC][/sIGPIC]

Posted

Okay, I have narrowed down the problem to being the cockpit. I think the problem with making a completely custom cockpit like in the Wunderluft template is that it does not include any light devices. It probably needs something like avBasicLightSystem, but that is not included in the Wunderluft template. (unless it was in this post, but that download is broken)

 

So far the only way I have been able to make the aircraft lights work is by using a FC3 style cockpit and getting the cockpit shape from my own edm file, but then mainpanel_init.lua doesn't work.

[sIGPIC][/sIGPIC]

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...