Jump to content

"Blank" Target...


Sierra99

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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]|

[/TABLE]

Link to comment
Share on other sites

  • Recently Browsing   0 members

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