Jump to content

Recommended Posts

Posted

Hey folks,

 

long time lurker here.

Been enjoying DCS a lot in the past,

trying to get a grasp of the scripting engine as of recently.

 

Currently I'm just goofing around trying to get stuff to work,

tried to make a bomber attack a random point in an editor placed zone.

 

This is what I came up with so far:

 

 

  1. Initializing both MIST and my own function Library upon mission start.
  2. Placed a Zone named 'mybombzone'.
  3. Placed a B1 bomber named 'mybomber', equipped with GBU-38 mid flight, 3 waypoints.

 

On second waypoint I run this script from the advanced waypoint for testing purposes:

 

GOM_fnc_BombZone('mybomber','mybombzone')

GOM_fnc_BombZone is a function defined in my own .lua file, initialized at mission start:

 

function GOM_fnc_BombZone(bombergroup,bombzone)

   local gName = Group.getByName(bombergroup)
   local getpoint = mist.getRandomPointInZone(bombzone)
   local bombing = {id = 'bombing', params = {point = getpoint}}
   Controller.setTask(Group.getController(gName), bombing)

end

No idea what I'm doing wrong, it's just throwing an empty error.

 

01534.063 ERROR   DCS: Mission script error: : (null)

Which leaves me puzzled.

All I know is that both script files are being correctly loaded upon mission start since there's other units using other functions just fine.

 

Any ideas?

 

Cheers

  • Recently Browsing   0 members

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