Sierra99 Posted March 8, 2017 Posted March 8, 2017 Gents... I want to try using some map objects as targets verses placing specific targets at a location...I looking for opinions on the best way to detect the target is destroyed. I've heard the "put a solider there". but I'm looking for something more elegant.. Sierra [sIGPIC][/sIGPIC] Primary Computer ASUS Z390-P, i7-9700K CPU @ 5.0Ghz, 32GB Patriot Viper Steel DDR4 @ 3200Mhz, ZOTAC GeForce 1070 Ti AMP Extreme, Samsung 970 EVO M.2 NVMe drives (1Tb & 500 Gb), Windows 10 Professional, Thrustmaster Warthog HOTAS, Thrustmaster Warthog Stick, Thrustmaster Cougar Throttle, Cougar MFDs x3, Saitek Combat Rudder Pedals and TrackIR 5. -={TAC}=-DCS Server Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 970.
Eight Ball Posted March 8, 2017 Posted March 8, 2017 EDIT: nvm. I thought you were talking about static objects, sorry. Find The Links To All My Mods And Liveries Here (in the gallery)
feefifofum Posted March 8, 2017 Posted March 8, 2017 I believe there's a function built into MiST for detecting this, something like MiST.isMapObjDestroy; you will need the ID of the building you're testing for which I'm not sure how to acquire but hopefully that will point you in the right direction. :) THE GEORGIAN WAR - OFFICIAL F-15C DLC
Sierra99 Posted March 8, 2017 Author Posted March 8, 2017 I was looking at using a zone trigger but the most function looks cleaner but how would I find the target ID. [sIGPIC][/sIGPIC] Primary Computer ASUS Z390-P, i7-9700K CPU @ 5.0Ghz, 32GB Patriot Viper Steel DDR4 @ 3200Mhz, ZOTAC GeForce 1070 Ti AMP Extreme, Samsung 970 EVO M.2 NVMe drives (1Tb & 500 Gb), Windows 10 Professional, Thrustmaster Warthog HOTAS, Thrustmaster Warthog Stick, Thrustmaster Cougar Throttle, Cougar MFDs x3, Saitek Combat Rudder Pedals and TrackIR 5. -={TAC}=-DCS Server Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 970.
firmek Posted March 8, 2017 Posted March 8, 2017 (edited) Sorry for a short reply, don't have much time right now. Look up threads describing how to detect a bridge being destroyed. This should give you a good example. A crude and simple method is to place a small zone covering the target and check for bombs in zone condition. This approach follows a big assumption that if the target was hit, it was destroyed. Edited March 8, 2017 by firmek F/A-18, F-16, F-14, M-2000C, A-10C, AV-8B, AJS-37 Viggen, F-5E-3, F-86F, MiG-21bis, MiG-15bis, L-39 Albatros, C-101 Aviojet, P-51D, Spitfire LF Mk. IX, Bf 109 4-K, UH-1H, Mi-8, Ka-50, NTTR, Normandy, Persian Gulf... and not enough time to fully enjoy it all
EasyEB Posted March 8, 2017 Posted March 8, 2017 Yeah, I'd recommend against fiddling with bomb in zone. It's way to unreliable and only brings misery.
FSFIan Posted March 8, 2017 Posted March 8, 2017 Note down the coordinates of the desired map object. In your mission script, use world.searchObjects to enumerate all map objects within 1 meter of that point and take the first (and hopefully only) result. You now have a reference to that object and should be able to check how much damage it has taken. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
dooom Posted March 8, 2017 Posted March 8, 2017 i use MIST for this purpose all the time with bridges. First i place a zone around the bridge ot map object i am setting as my target... making sure to encapsulate only the map target of interest. then i name the zone "bridge1" for example. Then i use a trigger to check if any ap object is dead in that zone with: do mist.flagFunc.mapobjs_dead_zones{ zones = {'bridge1'}, flag = 10 req_num = 1 } end then once MIST sees a dead object in Bridge1 it will fire flag 10 as true ... then my last trigger is usually a text message once>flag (10) TRUE> message to ALL "Bridge has been destroyed" i have also placed a zone around fuel depots at airfields and set the Mist flag to fire when 15 tanks are detroyed as an example... ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL
FlightControl Posted March 9, 2017 Posted March 9, 2017 If you're prepared to learn or try something else... local HitZone = ZONE:New( "Bridge" ) HitZone:HandleEvent( EVENTS.Dead ) function HitZpne:OnEventDead( EventData ) . if EventData.IniObjectCategory == 3 then . if EventData.IniUnit:InZone( self ) then . MESSAGE( "Bridge dead", 15 ):ToAll() . end . end end Just written out of my sleeve. 9 lines of code. If you're interested give a yell... Fc [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]
Recommended Posts