Muybonito523 Posted November 19, 2017 Share Posted November 19, 2017 Hi guys, been messing around in ME trying to get it to do what I want and I am currently working with: local staticObj = { ["heading"] = 0, ["groupId"] = 3, ["shape_name"] = "stolovaya", ["type"] = "Cafe", ["unitId"] = 3, ["rate"] = 100, ["name"] = "dynBuilding", ["category"] = "Fortifications", ["y"] = 621528.57142856, ["x"] = -294100, ["dead"] = false, } coalition.addStaticObject(country.id.USA, staticObj) from the Hoggit site, http://wiki.hoggit.us/view/DCS_func_addStaticObject The problem is, and with every table because even addGroup has a similar vague example, is there a place where I can find a list of all the attributes or Table items that I can modify, change, or do whatever to? I'm trying to spawn an aircraft static aircraft object with a specific livery, but I cant seem to figure out the table item that needs to be added to the above table to do that. i7 7800x @ 4.2Ghz I MSI M7ACK X299 I 32GB G Skill Ripjaws DDR4 2400 I ASUS STRIX GTX 1080Ti I Samsung EVO 960 500GB M.2 PCIe SSD I TM 16000M STICK / HOTAS / TM Pedals I Oculus Rift VR CV1 VF-111 Sun Downers [sIGPIC][/sIGPIC] Virtual Carrier Strike Group 1 | Discord Link to comment Share on other sites More sharing options...
Grimes Posted November 20, 2017 Share Posted November 20, 2017 Updated the page. For some formatting stuff like this you can make a mission with the data you are looking for, save it, open the .miz in a program like 7zip, open the embedded "mission" file in notepad++, and find the what you added. Generally speaking the the table saved in the .miz is in the same format the scripting engine will use. Static objects are a little weird though because in the .miz they are formatted the same as a group is, but when using coalition.addStaticObject it just needs to be a table. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
Muybonito523 Posted November 21, 2017 Author Share Posted November 21, 2017 Oh wow! Didn't know I could do that thanks! livery_id is what I was looking for, being able to open that out opens up a lot of info I didn't know I could get access to. It helped with the livery to because the "USAF Grape 31" for the f5 is what I was trying to use I had to use "US USAF Grape 31", wouldn't have known otherwise. i7 7800x @ 4.2Ghz I MSI M7ACK X299 I 32GB G Skill Ripjaws DDR4 2400 I ASUS STRIX GTX 1080Ti I Samsung EVO 960 500GB M.2 PCIe SSD I TM 16000M STICK / HOTAS / TM Pedals I Oculus Rift VR CV1 VF-111 Sun Downers [sIGPIC][/sIGPIC] Virtual Carrier Strike Group 1 | Discord Link to comment Share on other sites More sharing options...
Muybonito523 Posted November 23, 2017 Author Share Posted November 23, 2017 Question if you are willing to riddle me this, all the units I make in the Me seem to have the table generated. I can access certain things like their name, type, position, and so on like this: sUGKSF51_NAME = StaticObject.getByName('UGKS Static F5 #001'):getName() sUGKSF51_TYPE = StaticObject.getByName('UGKS Static F5 #001'):getTypeName() sUGKSF51_POS = StaticObject.getByName('UGKS Static F5 #001'):getPoint() My question is if there is a way to get other table properties of created units. Like say ["heading"] for example to get the heading of a unit or static object? I have tried this: sUGKSF51_HDG = StaticObject.getByName('UGKS Static F5 #001').heading but that leads to an error. i7 7800x @ 4.2Ghz I MSI M7ACK X299 I 32GB G Skill Ripjaws DDR4 2400 I ASUS STRIX GTX 1080Ti I Samsung EVO 960 500GB M.2 PCIe SSD I TM 16000M STICK / HOTAS / TM Pedals I Oculus Rift VR CV1 VF-111 Sun Downers [sIGPIC][/sIGPIC] Virtual Carrier Strike Group 1 | Discord Link to comment Share on other sites More sharing options...
Grimes Posted November 23, 2017 Share Posted November 23, 2017 Since a static object can't move you can just save the heading to somewhere when you spawn it. At any rate it has access to the same scripting commands but doesn't automatically put the table into a database. My mist library will add any object that gets dynamically spawned to its own databases which can be parsed for relevant data. You can also derive the heading manually like with this function: https://github.com/mrSkortch/MissionScriptingTools/blob/master/mist.lua#L1865 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
Muybonito523 Posted November 23, 2017 Author Share Posted November 23, 2017 Gotcha, I was using your MIST framework and also master controls MOOSE framework to try it out, but I realized that I didn't quite understand LUA and how the SSE uses it to do its stuff, figured it would be beneficial to try to do some basic stuff from scratch and then when I've finally pulled all my hair out in frustration, switch over to MIST or MOOSE so I can fully appreciate it, and have some background on how its really doing the magic. i7 7800x @ 4.2Ghz I MSI M7ACK X299 I 32GB G Skill Ripjaws DDR4 2400 I ASUS STRIX GTX 1080Ti I Samsung EVO 960 500GB M.2 PCIe SSD I TM 16000M STICK / HOTAS / TM Pedals I Oculus Rift VR CV1 VF-111 Sun Downers [sIGPIC][/sIGPIC] Virtual Carrier Strike Group 1 | Discord Link to comment Share on other sites More sharing options...
Recommended Posts