last1976 Posted January 6, 2015 Share Posted January 6, 2015 Cargo ---> Unit in Triggerzone. The Condition is available but dont work as other Static Objects work I think something has just been forgotten. i7-6700K / Msi Z170 Board / Kingston 32GB DDR4 / Msi GeForce GTX 980 4G / BQ STRAIGHT POWER 10 CM 700W / Fractal Define R5 Black / Alpenföhn "Brocken 2" / Samsung m2 980 Pro 1TB/ WD Blue 2TB / Windows 10 Pro Link to comment Share on other sites More sharing options...
FSFIan Posted February 13, 2015 Share Posted February 13, 2015 (edited) I did some further testing on this in the DCS Witchcraft Lua console. I hope that by looking at which methods work and which don't, someone at ED who knows the implementation can narrow this down. DCS Version: 1.2.14.36041 The reason for the trigger not working seems to be that getPosition() on a cargo object fails with an "Object doesn't exist" error (see below). First, let's spawn a cargo object (code adapted from this mission): local cargo_gid = 10000 local cargo_uid = 11000 local cargo_name = "MyCargo" local cargo_x = -317783.8125 local cargo_y = 19.547994613647 local cargo_z = 635431.625 local newCargo = { ["groupId"] = cargo_gid, ["category"] = "Cargos", ["type"] = "Cargo1", ["unitId"] = cargo_uid, ["x"] = cargo_x, ["y"] = cargo_z, ["canCargo"] = true, ["mass"] = 400, ["heading"] = 0, ["name"] = cargo_name, ["dead"] = false, ["country"] = "USA", ["shape_name"] = "ab-212_cargo", } coalition.addStaticObject(country.id.USA, newCargo) This places a cargo object named "MyCargo" near the Kutaisi airport tower. The following Lua snippets all raise an "Object doesn't exist" error: return StaticObject.getByName("MyCargo"):getPosition() return StaticObject.getByName("MyCargo"):getVelocity() return StaticObject.getByName("MyCargo"):getCategory() return StaticObject.getByName("MyCargo"):getPoint() StaticObject.getByName("MyCargo"):destroy() The following are snippets of Lua code (bold) and their return values (italic): return StaticObject.getByName("MyCargo"):getName() "MyCargo" return StaticObject.getByName("MyCargo"):isExist() false return StaticObject.getByName("MyCargo"):getDesc() { "attributes": { "Buildings": true }, "category": 4, "displayName": "", "life": 0, "typeName": "" } return StaticObject.getByName("MyCargo"):getLife() 0 return StaticObject.getByName("MyCargo"):getID() 0 return StaticObject.getByName("MyCargo"):getCargoDisplayName() " 400 kg" return StaticObject.getByName("MyCargo"):getCountry() 99 return StaticObject.getByName("MyCargo"):getCoalition() 2 return StaticObject.getByName("MyCargo"):choosingCargo() 1 -- trying to enumerate the cargo object -- (does not work, code is correct because -- a radius of 3 found the Huey I had landed -- next to it) local cargo_x = -317783.8125 local cargo_y = 19.547994613647 local cargo_z = 635431.625 local objects = {} local volume = { id = world.VolumeType.SPHERE, params = { point = {x = cargo_x, y = cargo_y, z = cargo_z}, radius = 2 } } local function handler(object, data) objects[#objects+1] = object end world.searchObjects({0,1,2,3,4,5}, volume, handler, nil) return mist.utils.tableShow(objects) {} Edited February 13, 2015 by [FSF]Ian DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Wrecking Crew Posted February 13, 2015 Share Posted February 13, 2015 OK... Ian :-) I'm familiar with Witchcraft to be able to place objects on the map and save the results -- to get exactly what I want for placement -- kudos for Witchcraft. I have scripts in missions, and see the LUA button in Witchcraft but need an explanation of how to see my scripts execute? Can my scripts exe from within the mission, or do I have to paste the code into Witchcraft? WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site. Link to comment Share on other sites More sharing options...
FSFIan Posted February 13, 2015 Share Posted February 13, 2015 I have scripts in missions, and see the LUA button in Witchcraft but need an explanation of how to see my scripts execute? Can my scripts exe from within the mission, or do I have to paste the code into Witchcraft? Executing a piece of Lua code from the DCS Witchcraft Lua Console has the same effect as executing it from a DO SCRIPT trigger action. In addition, if the code returns a value, it will be displayed in the Lua console. This thread has a good example of witchcraft-assisted problem solving. For further questions, please open a separate thread in the Mission Builder's Corner. Let's keep this one focused on squashing this particular bug. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
piXel496 Posted February 15, 2015 Share Posted February 15, 2015 (edited) I sympathise with Ian: "focuse on squashing this particular bug" Some relevant dev. butt needs a kick. :music_whistling: . Edited February 15, 2015 by piXel496 ... old stuff I made Link to comment Share on other sites More sharing options...
spinter Posted February 19, 2015 Share Posted February 19, 2015 Thank You how can I destroy the cargo? how can I find the coordinates? my great job does not work if I do not find a solution! ====VIAF==== Spinter 155° "Pantere Nere" TsSimComms My Site aiupgrade.net Link to comment Share on other sites More sharing options...
FSFIan Posted February 19, 2015 Share Posted February 19, 2015 Thank You how can I destroy the cargo? how can I find the coordinates? You can't. That's the point of this thread -- to tell ED that these functions are broken right now. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Belgeode Posted February 26, 2015 Share Posted February 26, 2015 I'm glad someone brought more attention to this. This issue has been a thorn in my side since the past weekend. [sIGPIC][/sIGPIC] YouTube ~ Twitch Link to comment Share on other sites More sharing options...
FlightControl Posted February 26, 2015 Share Posted February 26, 2015 Somebody to test in the beta version if these issues are fixed in 1.2.15 beta. Because i don't think so they will be fixed already... I could test myself, but just don't have the time right now. Sven [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE] Link to comment Share on other sites More sharing options...
FSFIan Posted February 28, 2015 Share Posted February 28, 2015 Still broken in 1.2.15.37241 Can we please get at least some acknowledgement that this is being worked on? This bug breaks existing missions. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
piXel496 Posted February 28, 2015 Share Posted February 28, 2015 (edited) With my subnormal intelligence, I see slingLoad behaves as if some object properties of the item cargo is not updated properly to a more general table nescessary for other functions? If it's just .lua call some file names and who knows.. We are motivated to make stuff for this brilliant game. Push us in the direction of the cause of this malfunction and maybe we can create our own temporary quickfix. If it's cause is embedded in an untweakable .dll. So be it and I patently wait another 3 months. Whatever it is, it is always nice to hear some reaction of a knowledgeable dev. . Edited February 28, 2015 by piXel496 Promise! I just say thanks and not flood with more questions. old stuff I made Link to comment Share on other sites More sharing options...
Highwayman-Ed Posted February 28, 2015 Share Posted February 28, 2015 +1 I have several missions that have been on the bench because this particular trigger is broken. Intel i9-9900KF @5.2GHz MSI Z390 Gaming Pro Carbon 32GB G.Skill Trident Z DDR3200 RAM MSI RTX 2080 Ti Gaming X Trio 40" Panasonic TH-40DX600U @ 4K Pimax Vision 8K Plus / Oculus Rift CV1 / HTC Vive Gametrix JetSeat with SimShaker Windows 10 64 Bit Home Edition [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Grimes Posted February 28, 2015 Share Posted February 28, 2015 Ian;2332231']Still broken in 1.2.15.37241 Can we please get at least some acknowledgement that this is being worked on? This bug breaks existing missions. It was fixed on an internal build, but it was to late to get it into 1.2.15. Hopefully there will be another patch for 1.2.15 with it. 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...
piXel496 Posted February 28, 2015 Share Posted February 28, 2015 Grimes, you are a beacon of light. Thanks! :) old stuff I made Link to comment Share on other sites More sharing options...
spinter Posted March 3, 2015 Share Posted March 3, 2015 thx ====VIAF==== Spinter 155° "Pantere Nere" TsSimComms My Site aiupgrade.net Link to comment Share on other sites More sharing options...
Belgeode Posted March 4, 2015 Share Posted March 4, 2015 Good news Grimes! Thanks for that update. [sIGPIC][/sIGPIC] YouTube ~ Twitch Link to comment Share on other sites More sharing options...
jeffdude Posted March 12, 2015 Share Posted March 12, 2015 The open beta patch did not fix the issue for me .16 still doesn't allow for cargo to set off an in zone trigger unless I am doing it wrong. Anyone have any luck with this? [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Grimes Posted March 12, 2015 Share Posted March 12, 2015 The open beta patch fixes the scripting functions for static objects, but the triggers are still broken. 1 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...
jeffdude Posted March 12, 2015 Share Posted March 12, 2015 thanks The open beta patch fixes the scripting functions for static objects, but the triggers are still broken. Ok, Thanks for clearing that up. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
last1976 Posted August 24, 2015 Author Share Posted August 24, 2015 Now as half a year has gone. Its seems still to be broken. ED is aware of this ? i7-6700K / Msi Z170 Board / Kingston 32GB DDR4 / Msi GeForce GTX 980 4G / BQ STRAIGHT POWER 10 CM 700W / Fractal Define R5 Black / Alpenföhn "Brocken 2" / Samsung m2 980 Pro 1TB/ WD Blue 2TB / Windows 10 Pro Link to comment Share on other sites More sharing options...
Recommended Posts