Hi I'm trying to learn how to use the MOOSE framework by creating a simple mission.
I try to use the UNIT_ZONE function.
I basicay copied reference mission ZON-300
So in the scrips I made a unit
RedVehicle1 = SPAWN
:New( "BMP3 1"):InitLimit( 1, 0)
This works fine and the unit spawns and drives the planned route.
I then use the following line :
BMP3Zone = ZONE_UNIT:New( "BMP3 Zone", Redvehicle1, 5 ) (Basicaly coppied straight from ZON-300)
The DCS.log now gives the following error :
Mission script error (Path) Attempt to call method GetVec2() (a nil value)
Stack traceback :
In function GetVec2()
string (path) in function new
string (path) in main chunk.
Source code shows part of the ZONE_UNIT function is the GetVec2() function (presumably getting the coordinate of the unit to create the zone)
Thinking this was because of late activation :
I removed late activation , no change,
I wraped the function in a : RedVehicle1:IsAlive() check but also no change
Further reading leads me to beleave this is a value that I do not need to declare before hand.
I cant see what I did wrong here as I coppied the line almost literaly from the demo mission.
Is there any thing I'm missing here or am I using an outdated template??