Jump to content

Randon Time


TheTrooper

Recommended Posts

Hi, I have found a Condition which is Time Since Flag but this is an absolute time. Is there a way to make it more random so there is a minimum time and a maximum time?

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

Intel® Core™i7 Quad Core Processor i7-6700 (3.4GHz) 8MB Cache | 32GB HyperX FURY DDR4 2133MHz | MSI GeForce RTX 2070 ARMOR 8G |SSD 1TB 970 EVO Plus M.2

Link to comment
Share on other sites

You can use MIST for that (https://forums.eagle.ru/showthread.php?t=98616):

 

First, in ME set some triggers to call the LUA/MIST code:

 

MISSION START > no condition > DO SCRIPT FILE (load MIST here)

MISSION START > no condition > DO SCRIPT (here put the code from below)

 

function activateRandomTime()
  local randChoice = mist.random(60,600)
  if timer.getAbsTime() + env.mission.start_time > randChoice then
      trigger.action.activateGroup(Group.getByName("MY_GROUP"))
  end
end
-Call function every 10 seconds
mist.scheduleFunction(activateRandomTime, {}, timer.getTime() + 1, 10)

 

Finally, put a group of planes in ME and set name MY_GROUP, with LATE ACTIVATION box checked

 

I haven't used this code since DCS 1.5, but i think it should work.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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