gdjs.evtsExt__TestExtensions__RelocateUnits = {};
gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1= [];
gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects2= [];
gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects1= [];
gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects2= [];
gdjs.evtsExt__TestExtensions__RelocateUnits.GDIndicatorObjects1= [];
gdjs.evtsExt__TestExtensions__RelocateUnits.GDIndicatorObjects2= [];

gdjs.evtsExt__TestExtensions__RelocateUnits.conditionTrue_0 = {val:false};
gdjs.evtsExt__TestExtensions__RelocateUnits.condition0IsTrue_0 = {val:false};


gdjs.evtsExt__TestExtensions__RelocateUnits.mapOfGDgdjs_46evtsExt_95_95TestExtensions_95_95RelocateUnits_46GDUnitObjects1Objects = Hashtable.newFrom({"Unit": gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects1});gdjs.evtsExt__TestExtensions__RelocateUnits.eventsList0 = function(runtimeScene, eventsFunctionContext) {

{


{
gdjs.evtsExt__TestExtensions__RelocateUnits.GDIndicatorObjects1.createFrom(eventsFunctionContext.getObjects("Indicator"));
gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1.createFrom(eventsFunctionContext.getObjects("Node"));
gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects1.length = 0;

{gdjs.evtTools.object.createObjectOnScene((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : runtimeScene), gdjs.evtsExt__TestExtensions__RelocateUnits.mapOfGDgdjs_46evtsExt_95_95TestExtensions_95_95RelocateUnits_46GDUnitObjects1Objects, (( gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1.length === 0 ) ? 0 :gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1[0].getPointX("")), (( gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1.length === 0 ) ? 0 :gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1[0].getPointY("")), "Units");
}{for(var i = 0, len = gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1.length ;i < len;++i) {
    gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1[i].returnVariable(gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1[i].getVariables().get("WorkerUnits").getChild("Blue")).sub(1);
}
}{for(var i = 0, len = gdjs.evtsExt__TestExtensions__RelocateUnits.GDIndicatorObjects1.length ;i < len;++i) {
    gdjs.evtsExt__TestExtensions__RelocateUnits.GDIndicatorObjects1[i].setString((gdjs.RuntimeObject.getVariableString(((gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1.length === 0 ) ? gdjs.VariablesContainer.badVariablesContainer : gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1[0].getVariables()).get("WorkerUnits").getChild("Blue"))));
}
}{for(var i = 0, len = gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects1.length ;i < len;++i) {
    gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects1[i].returnVariable(gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects1[i].getVariables().get("From")).setString(gdjs.evtTools.common.getVariableString(runtimeScene.getVariables().get("SelectedPoint")));
}
}{for(var i = 0, len = gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects1.length ;i < len;++i) {
    gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects1[i].returnVariable(gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects1[i].getVariables().get("To")).setString(gdjs.evtTools.common.getVariableString(runtimeScene.getVariables().get("CurrentOrder")));
}
}{for(var i = 0, len = gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1.length ;i < len;++i) {
    gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1[i].returnVariable(gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1[i].getVariables().get("BlueUnits")).sub(1);
}
}}

}


};

gdjs.evtsExt__TestExtensions__RelocateUnits.func = function(runtimeScene, Node, Unit, Indicator, parentEventsFunctionContext) {
var eventsFunctionContext = {
  _objectsMap: {
"Node": Node
, "Unit": Unit
, "Indicator": Indicator
},
  _objectArraysMap: {
"Node": gdjs.objectsListsToArray(Node)
, "Unit": gdjs.objectsListsToArray(Unit)
, "Indicator": gdjs.objectsListsToArray(Indicator)
},
  _behaviorNamesMap: {
},
  getObjects: function(objectName) {
    return eventsFunctionContext._objectArraysMap[objectName] || [];
  },
  getObjectsLists: function(objectName) {
    return eventsFunctionContext._objectsMap[objectName] || null;
  },
  getBehaviorName: function(behaviorName) {
    return eventsFunctionContext._behaviorNamesMap[behaviorName];
  },
  createObject: function(objectName) {
    var objectsList = eventsFunctionContext._objectsMap[objectName];
    if (objectsList) {
      return parentEventsFunctionContext ?
        parentEventsFunctionContext.createObject(objectsList.firstKey()) :
        runtimeScene.createObject(objectsList.firstKey());
    }
    return null;
  },
  getArgument: function(argName) {
    return "";
  },
  getOnceTriggers: function() { return runtimeScene.getOnceTriggers(); }
};

gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects1.length = 0;
gdjs.evtsExt__TestExtensions__RelocateUnits.GDNodeObjects2.length = 0;
gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects1.length = 0;
gdjs.evtsExt__TestExtensions__RelocateUnits.GDUnitObjects2.length = 0;
gdjs.evtsExt__TestExtensions__RelocateUnits.GDIndicatorObjects1.length = 0;
gdjs.evtsExt__TestExtensions__RelocateUnits.GDIndicatorObjects2.length = 0;

gdjs.evtsExt__TestExtensions__RelocateUnits.eventsList0(runtimeScene, eventsFunctionContext);
return;
}

