Jump to content

Removing Landed Aircraft - Mist


exnihilodub

Recommended Posts

Hi. I've searched the forum and only found: https://forums.eagle.ru/showthread.php?t=151449&highlight=remove+landed+aircraft this thread about the issue. Unfortunately that didn't make any sense to me since I'm too newb in mission making. I'd also appreciate it if you could help me understand and implement that in the script below.

 

A few months ago I've posted here about making a respawn script for units having a specific prefix in their group name. Thankfully Grimes responded and helped me accomplish what I've been trying to do.

 

The bad thing is, that script only removes if the aircraft is dead with the pilot. not if it's landed.

 

The code is:

 

 

	local prefix = 'RESPAWN'
for groupName, data in pairs(mist.DBs.groupsByName) do
	if string.find(groupName, prefix) then
		if (Group.getByName(groupName) and Group.getByName(groupName):isExist() == false) or (Group.getByName(groupName) and #Group.getByName(groupName):getUnits() < 1) or not Group.getByName(groupName) then
			mist.respawnGroup(groupName)
		end
	end	
end

 

He said the script has 3 conditions and if any of them returns true, it will respawn the aircraft. Can I somehow add another condition like: "if the aircraft has speed of <2 for x seconds, remove it" ? I've checked the MIST documentation but failed to find anything that returns a unit's speed.

 

Link to Grimes' full response: https://forums.eagle.ru/showpost.php?p=2757308&postcount=2

 

I appreciate any help you can offer about this request. Thank you all.


Edited by exnihilodub
addition
Link to comment
Share on other sites

Check out my Tanker respawn script which does something similar. Maybe you can take what you need from it.

 

 

Hi. I did check the script and the thread.

You said:

https://forums.eagle.ru/showpost.php?p=1850686&postcount=4

 

I couldn't find anything related to triggerzones or speed in your original post though.

 

 

 

http://wiki.hoggit.us/view/DCS_event_engine_shutdown

I've actually found this but have no idea how to use it inside the code

Link to comment
Share on other sites

  • Recently Browsing   0 members

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