6
« on: June 09, 2012, 09:31:48 pm »
Hey Guys!
I just wrote my own script, but it doesnt do anything.
Can someone help me solving this problem?
I'm still learning this stuff and I dont get what I did wrong.
unitList = allMissionObjects "LandVehicle" + allMissionObject "Air";
unitList2 = allUnits;
a = count unitList;
b = count unitList2;
c = 0;
d = 0;
while {true} do
{
unitList = allMissionObjects "LandVehicle" + allMissionObjects "Air";
a = count unitList;
c = 0;
for "c" from 0 to a do
{
unit = unitList select c
_name = (configFile >> "ConfigVehicles" >> (typeof unit) >> "displayName");
marker = ("vehicleMarker"+ (str i));
marker createMarkerLocal [marker, pos];
marker setMarkerTypeLocal "mil_dot";
marker setMarkerPosLocal (pos);
marker setMarkerColorLocal ("ColorBlue");
marker setMarkerTextLocal format ["%1", _name];
};
sleep ;
unitList2 = allUnits;
b = count UnitList2;
d = 0;
for d from 0 to b do
{
unit = unitList select d;
pos = position unit;
deleteMarkerLocal ("playerMarker"+ (str d));
marker = "playerMarker" + (str d);
marker = createMarkerLocal [marker, pos];
marker setMarkerTypeLocal "mil_dot";
marker setMarkerPosLocal (pos);
marker setMarkerColorLocal ("ColorRed");
marker setMarkerTextLocal format ["%1", name unit, _name];
};
sleep 1;
};
hint "derp";