Help with LSOView coding - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 10-12-2018, 09:27 AM   #1
Nealius
Senior Member
 
Join Date: Feb 2013
Location: Tokyo
Posts: 2,361
Default Help with LSOView coding

So, after making my custom Stennis cameras mod, I'm working on doing the same with the Tarawa, but things aren't working right.

I can edit the LSOView coordinates just fine, and they work, but I cannot comment out views to select a specific one from the list.

Code:
GT.LSOView = {
	cockpit = "empty", 
	position = {
		--[[connector = "",]] 
		offset = {-68.0, 21.0, -21.00, 0.0, 0.0}
	} 
} ---Elev. Port
GT.LSOView = {
	cockpit = "empty", 
	position = {
		--[[connector = "",]] 
		offset = {-115.0, 21.5, -16.00, 0.0, 0.0}
	} 
} ---Stern Port
GT.LSOView = {
	cockpit = "empty", 
	position = {
		--[[connector = "",]] 
		offset = {-123.0, 21.5, 7.00, 0.0, 0.0}
	} 
} ---Stern Starboard
GT.LSOView = {
	cockpit = "empty", 
	position = {
		--[[connector = "",]] 
		offset = {-45.0, 21.5, 3.00, 120.0, 0.0}
	} 
} ---Forklift
With the above code, DCS chooses the last LSOView in the list. In this case, "Forklift." However, if I want to disable "Forklift" and use "Stern Starboard," I would normally comment out the "Forklift" view simply by placing two hyphens like this:

Code:
--GT.LSOView = {
	cockpit = "empty", 
	position = {
		--[[connector = "",]] 
		offset = {-45.0, 21.5, 3.00, 120.0, 0.0}
	} 
} ---Forklift
With the Stennis's code, this works perfectly fine. With the Tarawa, this causes a failure to load any mission with the Tarawa in it. Upon trying to load a Tarawa mission, the loading screen will get stuck at "Terrain Graphics Init: 97, (mapname).ng." The DCS log gives a GUI error and then enters "State 5," whatever that means:

Quote:
2018-10-12 09:18:27.673 ALERT LUACOMMON: Error: GUI Error: [string "./MissionEditor/modules/me_mission.lua"]:1206: attempt to index local 'unit' (a nil value)
GUI debug.traceback: stack traceback:
[C]: ?
[string "./MissionEditor/modules/me_mission.lua"]:1206: in function 'fixWaypointsLinks'
[string "./MissionEditor/modules/me_mission.lua"]:1643: in function 'load'
[string "./MissionEditor/modules/me_openfile.lua"]:622: in function 'func'
[string "./Scripts/UI/ProgressBarDialog.lua"]:138: in function 'updater'
[string "./Scripts/UpdateManager.lua"]:64: in function <[string "./Scripts/UpdateManager.lua"]:40>
2018-10-12 09:18:43.398 INFO EDCORE: (dDispatcher)enterToState_:5
I cannot figure out why this is happening. The only difference I can see between the Stennis's .lua file and the Tarawa's .lua file is that with the Stennis, the LSOView codes are all a single line, whereas the Tarawa's LSOView codes are 7 lines. Perhaps I am messing up the format?
__________________
YouTube Channel: "Clutch"

ASUS Z170 | i5-7600 | GTX1050Ti | 16GB DDR4 | Windows 10
Nealius is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:48 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.