Jump to content

Recommended Posts

Posted

Hi guys

 

How can i make helos on a cap mission spawn every 5 minutes?

 

I used Mist to respawn a Heli but dont work for me.

 

For example:

1 Group With 4 Helos Fly and provide suport

When group spend all ammo, rtb to refuel (i know AI dont use refuel in game. Just clone and delete after 1 minute it's ok for me)

When group die respawn after 10 ~ 20 minutes. But here i have another problem (heli crash and not explode, the mist script not work)

 

Then respawn with mist = OK

Respawn when die = OK

Respawn after crash (not explode) = Not Ok

Respawn after land (simulating rearm) = Not ok

 

Anyone can help me? Sorry if i made mistakes my english is terrible

System Specs:

 

Windows 10 Pro x64, NVidia GeForce GTX 970 Gigabyte G1 Gaming 4GB, FX 8350 4.0 Ghz ( Cooled by Custom Cooler ), 8GB DDR3 1600 Mhz , ASUS M5A97 R2.0, x1 240gb ssd (Windows) x1 120gb ssd (DCS World) x1 500gb hd, Thustmaster T Flight X, CH Pro Throttle and CH Pro Pedals

Posted

I would try this bit of code from this thread (http://forums.eagle.ru/showthread.php?t=124836) let me know if this works.

 

 

Mission setup:

 

  • AI Flight Groups - (Set Options - RTB on out of Ammo, RTB on Low Fuel)
  • AI Flight Groups - Advanced waypoint commands (flag 999 to true) as a STOP condition on all CAP, CAS, Orbit commands and return to base.
  • Mission Complete Trigger - (Flag 999 set true)

 

 

Script:

 

 

  • SCRIPT - Respawns AI Flight Group when they are all dead
  • SCRIPT - Respawns AI Flight if Leader is NOT IN THE AIR - CRASHED, KILLED or has LANDED. (To be Disabled when I figure out how to check all flight members have landed)
  • SCRIPT - Respawns AI Flight only when All of group have landed and powered down. (WIP)
  • Disabled - RESPAWN on LOW FUEL
  • SCRIPT - Will not RESPAWN any GROUPS once Flag 999 = 1

 

 

New LUA Predicate code for DRAGONS the DAM

----------------------------------------------------------------

 

-- Condition --> LUA PREDICATE:

local groupName = 'A-10C #1.1 AI' -- MISSON EDITOR: FLIGHT GROUP NAME

local lowFuelThreshold = 0.08 -- RTB when less then this amount of fuel (10%)

env.setErrorMessageBoxEnabled(false) -- Message Box on error: FALSE=No Box, TRUE=Show Box

 

 

-- ***********

-- Add 1 to Group Name for new Flight Group when it respawns

if barons_respawn_script and barons_respawn_script[groupName] then

groupName = groupName .. barons_respawn_script[groupName]

end

 

-- Set Flag 999 to true in Mission when Mission is Completed and No more waves of AI Aircraft are needed

flag_999 = trigger.misc.getUserFlag('999')

 

-- If the Whole Flight Group is DEAD respawn replacements until Flag 999=1

local group = Group.getByName(groupName)

if (not group and flag_999 == 0) then

return true

end

 

-- If Flight Groups LEADER is DEAD or LANDED respawn replacements until Flag 999=1

group = group:getUnits()[1]

if (not group and flag_999 == 0) or (Unit.inAir(group) == false and flag_999 == 0) then

return true

end

 

--[[

-- If Groups Fuel is below Threshold send out a replacement Flight Group until Flag 999=1

if (group:getFuel() < lowFuelThreshold and flag_999 == 0) then

return true

end

]]

  • Recently Browsing   0 members

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