Jump to content

Emulating GMTI - moving units only visible


Tyro-AWG

Recommended Posts

Hi everyone, I'm somewhat new to scripting and I'm definitely not a software engineer, but I've taken the time to try to learn enough LUA to make MOOSE useable.

 

As part of a broader multiplayer concept, I'm trying to emulate off-board sensors and intelligence feeds such as GMTI and I've hit a conceptual stumbling block that I can't think of a solution for.

 

I have a mission in which all ground units default to 'invisible' in the ME.

 

I need a script that should monitor all ground units of the opposing coalition and set the 'invisible' tag OFF only when units are moving, and set it back ON again when they stop. In this way Tac Cdrs and JTACs will only see units in the F10 map if they are moving at the time.

 

Anyone got any ideas? Thanks again for your help.

Link to comment
Share on other sites

I could be wrong, but I know the invisible tag makes units invisible to other units. I'm not sure if it has that same effect with the F10 map. Regardless, you'd have to make sure the F10 map had the correct settings too.

 

I'm also interested in a MOOSE script that turns invisibility on/off for units, but for a different reason.

The State Military (MAG 13)

 

[sIGPIC][/sIGPIC]



 

SHEEP WE-01

AV-8B BuNo 164553

VMA-214

Col J. “Poe” Rasmussen

http://www.statelyfe.com

 

Specs: Gigabyte Z390 Pro Wifi; i9-9900K; EVGA 2080 Ti Black; 32GB Corsair Vengeance LPX DDR4; Samsung 970 EVO Series M.2 SSD; WIN10; ASUS VG248QE; CV-1 and Index



Modules: A-10C; AV8B; CA; FC3; F-5; F-14; F-18; F-86; HAWK; L-39; P-51; UH1H; NTTR; Normandy; Persian Gulf

Link to comment
Share on other sites

invisible tag makes them hidden to AI. Hidden tag (hidden on map) makes it invisible on the map. I am not sure you can alter the later outside ME. You can read it but I haven't seen any function which can alter it. You can however alter this parameter when you spawn a new group/unit but once you set it, you can't modify the property

[sIGPIC]OK[/sIGPIC]

Link to comment
Share on other sites

I think my game plan at the moment is to have a unit in place that can detect the ground units, as all air units seem to have ridiculous detect/geolocate capabilities. Then use invisible tag to control whether it shows on the F-10 map. I've tested this and it works, but now I'm trying to get it to depend on unit speed and struggling!

Link to comment
Share on other sites

Note that setting the invisible tag will not make it hidden on the map. It will just make it invisible to the AI units. If that's what you want, then you are set. If not then you will have to manipulate the hidden property on a new object. Is not working on active groups/units.

 

https://wiki.hoggitworld.com/view/DCS_command_setInvisible

 

Description:	Sets the controlled group to be invisible to other AI forces. Note they can still be hit through sheer luck, AI will not actively target this group.

[sIGPIC]OK[/sIGPIC]

Link to comment
Share on other sites

With Moose?

 

 

Is there a way to implement this with MOOSE?

The State Military (MAG 13)

 

[sIGPIC][/sIGPIC]



 

SHEEP WE-01

AV-8B BuNo 164553

VMA-214

Col J. “Poe” Rasmussen

http://www.statelyfe.com

 

Specs: Gigabyte Z390 Pro Wifi; i9-9900K; EVGA 2080 Ti Black; 32GB Corsair Vengeance LPX DDR4; Samsung 970 EVO Series M.2 SSD; WIN10; ASUS VG248QE; CV-1 and Index



Modules: A-10C; AV8B; CA; FC3; F-5; F-14; F-18; F-86; HAWK; L-39; P-51; UH1H; NTTR; Normandy; Persian Gulf

Link to comment
Share on other sites

Its a normal scripting engine function, you can do it at anypoint. Just get the controller and do this.

 

local con = Group.getByName('whatever'):getController()
con:setCommand({id = 'SetInvisible',  params = {value = true  }})

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting 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

Its a normal scripting engine function, you can do it at anypoint. Just get the controller and do this.

 

local con = Group.getByName('whatever'):getController()
con:setCommand({id = 'SetInvisible',  params = {value = true  }})

 

Thank you Grimes. I started to realize that after I asked, but this is helpful. I don't think I've ever written anything for DCS without framework before.

The State Military (MAG 13)

 

[sIGPIC][/sIGPIC]



 

SHEEP WE-01

AV-8B BuNo 164553

VMA-214

Col J. “Poe” Rasmussen

http://www.statelyfe.com

 

Specs: Gigabyte Z390 Pro Wifi; i9-9900K; EVGA 2080 Ti Black; 32GB Corsair Vengeance LPX DDR4; Samsung 970 EVO Series M.2 SSD; WIN10; ASUS VG248QE; CV-1 and Index



Modules: A-10C; AV8B; CA; FC3; F-5; F-14; F-18; F-86; HAWK; L-39; P-51; UH1H; NTTR; Normandy; Persian Gulf

Link to comment
Share on other sites

... applying that logic only to moving units within certain areas.

 

You'd have to set up speed-greater-than and in-zone triggers. I'm not sure it's possible in the mission editor, if that's what you're using, but I know it's possible to do with code. I can' look it up right now, but that's where I'd start.

 

Edit: Had a second and found a couple code snippets. I only know Moose (somewhat), but maybe try using these?

 

Unit

Group

Positionable

Zones

 

POSITIONABLE:GetVelocityMPS() and UNIT:IsInZone(Zone)


Edited by rassy7
Updated with code snippets

The State Military (MAG 13)

 

[sIGPIC][/sIGPIC]



 

SHEEP WE-01

AV-8B BuNo 164553

VMA-214

Col J. “Poe” Rasmussen

http://www.statelyfe.com

 

Specs: Gigabyte Z390 Pro Wifi; i9-9900K; EVGA 2080 Ti Black; 32GB Corsair Vengeance LPX DDR4; Samsung 970 EVO Series M.2 SSD; WIN10; ASUS VG248QE; CV-1 and Index



Modules: A-10C; AV8B; CA; FC3; F-5; F-14; F-18; F-86; HAWK; L-39; P-51; UH1H; NTTR; Normandy; Persian Gulf

Link to comment
Share on other sites

Great, rassy7 thanks! I'll have a play with this tonight. Hopefully in the next few weeks I will get to something that I can release for 'peer review'. Hoping that it's something the community hasn't seen before. I'm struggling now with how to activate a unit spawned as 'uncontrolled' without respawning it. I can get it to work with an E2 and Reaper but nothign else!... wish me luck!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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