Jump to content
Sign in to follow this  
-Total-

Another Evo Editing Thread

Recommended Posts

This edited mission will not be posted, and will be used for private use. I respect Kilroy's authorship wishes.

Working with EvolutionB2 at the moment.

Trying to add another capture zone. Here's what I've edited so far, but the radio tower is not showing up on the mission map, and I get an error when entering the perimeter that I believe is linked to the enableai trigger. No AI show up when I hit the area.

Using Chantico as the experiement town and labeling it "cha"

Any assistance would be appreciated:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

Briefing.html

<p><a name = "OBJ_12"></a>Primary : Clear <a href="marker:mobj11">Chantico</a></p>

<p>Secondary : Destroy <a href="marker:radobj12">Radio Tower</a></p>

<hr>

description.ext

class MAIN_cha

{

name = "MAIN_cha";

sound[] = {"null.ogg", db-40, 1.0};

title = "CHANTICO IS CLEAR OF ENEMY, GREAT JOB MEN";

};

class SUB_cha

{

name = "SUB_cha";

sound[] = {"null.ogg", db-40, 1.0};

title = "COMUNICATIONS CUT AT CHANTICO, GOOD WORK";

};

class SUB_chab

{

name = "SUB_chab";

sound[] = {"null.ogg", db-40, 1.0};

title = "OFFICER DETAINED AT CHANTICO, GOOD WORK";

};

Init.sqf

Bchainf=6;

Bchamec=7;

chainf=6;

chamec=7;

incha=flase;

ocha=false;

"12" objstatus "Active";

"13" objstatus "Active";

chaso1 addEventHandler ["killed", {(_this select 0) removealleventhandlers "killed";sop = (_this select 1);sot = chaso1;sor = 10;publicVariable "sop";publicVariable "sot";publicVariable "sor"}];

_radios = [parso1,somso1,cayso1,dolso1,ortso1,corso1,obrso1,bagso1,eposo1,masso1,pitso1,chaso1];

ocha = _vars select 12;

lives = _vars select 13;

Mission.SQF

class Item85

{

position[]={8205.930664,11.673760,8968.777344};

a=500.000000;

b=500.000000;

activationBy="EAST";

timeoutMin=10.000000;

timeoutMid=10.000000;

timeoutMax=10.000000;

interruptable=1;

age="UNKNOWN";

text="chantico";

name="chanlist";

expCond="isServer and (""Car"" countType thislist  == 0) and (""Tank"" countType thislist  == 0) and (""Man"" countType thislist <= 6) and (""Land"" countType list acha > 0) or ocha";

expActiv="[west,""HQ""] sideradio ""MAIN_cha"";""12"" objstatus ""done"";deleteMarker ""mobj12"";{_x addScore 10} forEach list acha;{handle = [_x] execVM ""scripts\submit.sqf""} forEach thislist;if (isServer) then {ocha=true;publicVariable ""ocha""}";

class Effects

{

titleType="TEXT";

titleEffect="PLAIN DOWN";

title="Chantico Clear";

};

};

class Item86

{

position[]={8186.323242,11.970000,8957.450195};

a=600.000000;

b=600.000000;

activationBy="WEST";

repeating=1;

age="UNKNOWN";

text="enableai";

name="acha";

expCond="local server and (""Land"" countType thislist > 0) or local server and (""Helicopter"" countType thislist > 0)";

expActiv="incha=true;lastalert=""mobj12"";spawne = [""cha"",chalist,acha,ocha,chainf,chamec,chaso1] spawn {[_this select 0,_this select 1,_this select 2,_this select 3,_this select 4,_this select 5,_this select 6] call EVO_Erec}";

class Effects

{

};

};

class Item91

{

position[]={8203.497070,11.970000,8953.193359};

name="mobj12";

markerType="ELLIPSE";

type="Flag";

colorName="ColorBlack";

a=500.000000;

b=500.000000;

};

class Item92

{

position[]={6957.864258,48.184658,8000.614258};

name="charef";

type="Empty";

};

class Item93

{

position[]={7422.459961,86.170845,8061.403809};

name="charefa";

type="Empty";

};

class Item94

{

position[]={8399.412109,166.626022,8161.269531};

name="charefb";

type="Empty";

};

missions/mass.sqf

_allobj = ["mobj1","mobj2","mobj3","mobj4","mobj5","mobj6","mobj7","mobj8","mobj9","mobj10","mobj11","mobj12"];

missions/msaad.sqf

_allobj = ["mobj1","mobj2","mobj3","mobj4","mobj5","mobj6","mobj7","mobj8","mobj9","mobj10","mobj11","mobj12"];

EventsS.sqf

case "chainf":

{

chainf = chainf-1;

lastalert="mobj12";

};

case "chamec":

{

chamec = chamec-1;

lastalert="mobj12";

};

Flightpath.SQF

_allobj = ["usaf","mobj1","mobj2","mobj3","mobj4","mobj5","mobj6","mobj7","mobj8","mobj9","mobj10","mobj11","mobj12"];

makepara.sqf

case "mobj12":

{

_spawn = GetMarkerPos "charef";

_radio = chaso1;

_target = GetMarkerPos lastalert;

_alist = acha;

_elist = chalist;

_cond = ocha;

if(chainf>=Bchainf) then {_cond=true}else{chainf=chainf+1};

_tag = "chainf";

};

pinit.sqf

if (alive chaso1) then

{

_rad11 = createMarkerLocal ["radobj12", position chaso1];

_rad11 setMarkerShapeLocal "ICON";

_rad11 setMarkerTypeLocal "Destroy";

_rad11 setMarkerTextLocal "Destroy Radio Tower";

_rad11 setMarkerSizeLocal [0.5, 0.5];

};

reinforce.sqf

case "mobj12":

{

_spawn = GetMarkerPos "charef";

_spawns = ["charef","charefa","charefb"];

_radio = chaso1;

_target = GetMarkerPos lastalert;

_alist = acha;

_elist = chalist;

_cond = ocha;

if(chamec>=Bchamec) then {_cond=true}else{chamec=chamec+1};

_tag = "chamec";

};

sorew.sqf

   case chaso1:

   {

[west,"HQ"] sideradio "SUB_cha";

   };

   case chaso2:

   {

[west,"HQ"] sideradio "SUB_chab";

   };

update.sqf

allvar = [end,opar,osom,ocay,oort,ocor,obag,oobr,oepo,omas,opit,odol,ocha,lives];

Share this post


Link to post
Share on other sites

Getting these errors when i drive into the trigger zone and can't figure out what is causing this.

What 3 elements are expected and not being provided?

Also, the error report shows an expression of

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><ound(random 1) == 1) then

Obviously, the "r" is missing, but I have searched every instance of that phrase in the script and not found one that is missing an "r"

AUGH!

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

Error in expression <round(random 1) == 1) then

{

_wp = _grp addWaypoint [_pos, 400];

_wp2 = _grp add>

 Error position: <addWaypoint [_pos, 400];

_wp2 = _grp add>

 Error 0 elements provided, 3 expected

File C:\Documents and Settings\Bill\My Documents\ArmA Other Profiles\Total%2erX^\missions\EvolutionB2GR1.Sara\scripts\EventsS.sqf, line 358

Error in expression <round(random 1) == 1) then

{

_wp = _grp addWaypoint [_pos, 400];

_wp2 = _grp add>

 Error position: <addWaypoint [_pos, 400];

_wp2 = _grp add>

 Error 0 elements provided, 3 expected

File C:\Documents and Settings\Bill\My Documents\ArmA Other Profiles\Total%2erX^\missions\EvolutionB2GR1.Sara\scripts\EventsS.sqf, line 358

Error in expression <round(random 1) == 1) then

{

_wp = _grp addWaypoint [_pos, 400];

_wp2 = _grp add>

 Error position: <addWaypoint [_pos, 400];

_wp2 = _grp add>

 Error 0 elements provided, 3 expected

File C:\Documents and Settings\Bill\My Documents\ArmA Other Profiles\Total%2erX^\missions\EvolutionB2GR1.Sara\scripts\EventsS.sqf, line 358

Error in expression <round(random 1) == 1) then

{

_wp = _grp addWaypoint [_pos, 400];

_wp2 = _grp add>

 Error position: <addWaypoint [_pos, 400];

_wp2 = _grp add>

 Error 0 elements provided, 3 expected

File C:\Documents and Settings\Bill\My Documents\ArmA Other Profiles\Total%2erX^\missions\EvolutionB2GR1.Sara\scripts\EventsS.sqf, line 358

Error in expression <ound(random 1) == 1) then

{

_wp = _grp addWaypoint [(_outpoints select 0), 0];

>

 Error position: <addWaypoint [(_outpoints select 0), 0];

>

 Error Type Any, expected Number

File C:\Documents and Settings\Bill\My Documents\ArmA Other Profiles\Total%2erX^\missions\EvolutionB2GR1.Sara\scripts\EventsS.sqf, line 377

Error in expression <ound(random 1) == 1) then

{

_wp = _grp addWaypoint [(_outpoints select 0), 0];

>

 Error position: <addWaypoint [(_outpoints select 0), 0];

>

 Error Type Any, expected Number

File C:\Documents and Settings\Bill\My Documents\ArmA Other Profiles\Total%2erX^\missions\EvolutionB2GR1.Sara\scripts\EventsS.sqf, line 377

Share this post


Link to post
Share on other sites

@ Mods - Not intending to bump for the sake of "bumping"

Just at my wit's end and can't figure out what I am doing wrong. I love to learn via figuring things out on my own, but when I get stuck, I have to ask for help sad_o.gif

I just keep hitting the same brick wall no matter what I try. Someone show me where I am missing the obvious?

Share this post


Link to post
Share on other sites

not sure but I think your variable _pos is not a array.

try to debug by putting this line before the first

_wp = _grp addWaypoint [_pos, 400]

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player sidechat format["_pos = %1",_pos];

_wp = _grp addWaypoint [_pos, 400];

it should = [23445.688,234555.455,0.0000078]

( but not those exact numbers) when run.

those are the 3 elements

Share this post


Link to post
Share on other sites

Here is the EventS script (forgot this in my first post)

I can see what you're saying, but I don't see how it would fit within the script here.......

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">EVO_Delete =

{

_grp= _this select 0;

rscripts=rscripts+1;

_time = 1.0 + (random 2.5);

_all = units _grp;

_count = (count units _grp)-1;

sleep _time;

while {_count >= 0} do

{

_man = (units _grp select _count);

_unit = vehicle _man;

if (not (_unit isKindOf "Man") and not (isNull _unit)) then

{

deletevehicle _unit;

_man removeAllEventHandlers "killed";

deletevehicle _man;

};

if ((_unit isKindOf "Man") and not (isNull _unit)) then

{

_man removeAllEventHandlers "killed";

deleteVehicle _unit;

};

_count = _count-1;

};

rscripts=rscripts-1;

};

EVO_functest =

{

_num = _this select 0;

for [{_loop=0}, {_loop<1}, {_loop=_loop}] do

{

hint format["%1 inloop ftest",_num];

sleep 1.0;

};

};

EVO_gRecy =

{

_grp = _this select 0;

_tag = "notset";

_alist = objNull;

_tag = _this select 1;

_alist = _this select 2;

//hint format["alist=%1",_alist];

rscripts=rscripts+1;

egroups = egroups+1;

for [{_loop=0}, {_loop<1}, {_loop=_loop}] do

{

if(count units _grp == 0) then {_loop=1};

sleep 8.0+(round random 1);

};

if (count list _alist > 0) then

{

switch (_tag) do //who died where?

{

case "parinf":

{

parinf = parinf-1;

lastalert="mobj1";

};

case "parmec":

{

parmec = parmec-1;

lastalert="mobj1";

};

case "sominf":

{

sominf = sominf-1;

lastalert="mobj2";

};

case "sommec":

{

sommec = sommec-1;

lastalert="mobj2";

};

case "cayinf":

{

cayinf = cayinf-1;

lastalert="mobj3";

};

case "caymec":

{

caymec = caymec-1;

lastalert="mobj3";

};

case "dolinf":

{

dolinf = dolinf-1;

lastalert="mobj4";

};

case "dolmec":

{

dolmec = dolmec-1;

lastalert="mobj4";

};

case "ortinf":

{

ortinf = ortinf-1;

lastalert="mobj5";

};

case "ortmec":

{

ortmec = ortmec-1;

lastalert="mobj5";

};

case "corinf":

{

corinf = corinf-1;

lastalert="mobj6";

};

case "cormec":

{

cormec = cormec-1;

lastalert="mobj6";

};

case "obrinf":

{

obrinf = obrinf-1;

lastalert="mobj7";

};

case "obrmec":

{

obrmec = obrmec-1;

lastalert="mobj7";

};

case "baginf":

{

baginf = baginf-1;

lastalert="mobj8";

};

case "bagmec":

{

bagmec = bagmec-1;

lastalert="mobj8";

};

case "epoinf":

{

epoinf = epoinf-1;

lastalert="mobj9";

};

case "epomec":

{

epomec = epomec-1;

lastalert="mobj9";

};

case "masinf":

{

masinf = masinf-1;

lastalert="mobj10";

};

case "masmec":

{

masmec = masmec-1;

lastalert="mobj10";

};

case "pitinf":

{

pitinf = pitinf-1;

lastalert="mobj11";

};

case "pitmec":

{

pitmec = pitmec-1;

lastalert="mobj11";

};

case "chainf":

{

chainf = chainf-1;

lastalert="mobj12";

};

case "chamec":

{

chamec = chamec-1;

lastalert="mobj12";

};

default

{

};

};

};

deleteGroup _grp;egroups = egroups-1;

rscripts=rscripts-1;

};

EVO_Lock =

{

_vec = _this select 0;

if(Param1 == 7) then {_vec lock true} else {_vec lock false};

};

EVO_Taxi =

{

for [{_loop=0}, {_loop<1}, {_loop=_loop}] do

{

_pos = GetMarkerPos "Respawn_West";

_pilot = createGroup (west);

"SoldierWB" createUnit [_pos, _pilot];

_pi =(leader _pilot);

_pi setIdentity "thedood";

_pi setcaptive true;

_heli = ObjNull;

for [{_loopa=0}, {_loopa<1}, {_loopa=_loopa}] do

{

sleep 4;

_objs = nearestObjects [_pi, ["MH6"], 200];

_heli = ObjNull;

{if(isNull driver _x) then {_heli = _x}} forEach _objs;

if(not isNull _heli) then

{

_pi assignAsDriver _heli;

[_pi] orderGetIn true;

Waituntil {not isNull (driver _heli)};

if((driver _heli) == _pi) then {_loopa=1};

};

};

_heli setcaptive true;

_wbase = "HeliHEmpty" createVehicleLocal _pos;

_pilot setBehaviour "CARELESS";

_targ1 = position mresc;

_heli engineon true;

while {canmove _heli} do

{

Waituntil {count crew _heli > 3};

_targ2 = GetMarkerPos lastalert;

_targ = [(_targ2 select 0),(_targ2 select 1)+600,(_targ2 select 2)];

_wbase setpos _targ;

_pi commandMove _targ;

Waituntil {_heli distance _targ < 200 or not(canmove _heli)};

commandGetOut _pi;

Waituntil {(position _pi select 2) < 8 or not(canmove _heli)};

commandStop _pi;

Waituntil {count crew _heli == 1 or not(canmove _heli)};

_pi commandMove _targ1;

Waituntil {_heli distance _targ1 < 200 or not(canmove _heli)};

commandGetOut _pi;

Waituntil {(position _pi select 2) < 8 or not(canmove _heli)};

commandStop _pi;

};

waitUntil {not (alive _heli) or isNull (driver _heli)};

if (alive _pi) then {_pi setdammage 1};

sleep 10.0;

};

};

EVO_Erefway =

{

_pos = _this select 0;

_grp = _this select 1;

_radio = _this select 2;

_list = _this select 3;

_enemy = objNull;

_epos = _pos;

if(count list _list > 0) then

{

_enemy = (list _list select 0);

//hint format["bguy %1",(list _list select 0)];

_epos = position _enemy;

};

_wp = _grp addWaypoint [position _radio, 0];

_wp1 = _grp addWaypoint [_epos, 0];

_wp2 = _grp addWaypoint [_pos, 300];

_wp3 = _grp addWaypoint [_pos, 300];

_wp4 = _grp addWaypoint [position _radio, 0];

[_grp, 5] setWaypointType "CYCLE";

};

EVO_Erec =

{

//[etrigger,wtrigger,completed,infantry,mecinized]

rscripts=rscripts+1;

_placetag = _this select 0;

_list = _this select 1;

_disable = _this select 2;

_exitcond = _this select 3;

_inf = _this select 4;

_mec = _this select 5;

_radio = _this select 6;

_newgrps = [];

_newigrps = [];

_newmgrps = [];

_rndpoints = [];

_offobj = objNull;

_taginf = "";

_tagmec = "";

_taginf = format["%1inf",_placetag];

_tagmec = format["%1mec",_placetag];

//_civs = [placetag,_list,_disable,_exitcond,_inf,_mec] execVM "scripts\CRecruit.sqf";

if (not _exitcond) then

{

{if(_x isKindOf "OfficerE") then {_offobj = _x}} forEach list _list;

_pos = position _list;

_pos1 = [(_pos select 0)+300,(_pos select 1),(_pos select 2)];

_pos2 = [(_pos select 0),(_pos select 1)+300,(_pos select 2)];

_pos3 = [(_pos select 0)-300,(_pos select 1),(_pos select 2)];

_pos4 = [(_pos select 0),(_pos select 1)-300,(_pos select 2)];

_outpoints = [_pos1,_pos2,_pos3,_pos4];

//Officer defence

if (not isNull _offobj) then

{

_grp = createGroup (east);

_unit = _grp createUnit ["SquadLeaderE", position _offobj, [], 0, "FORM"];[_unit] join _grp;

_wp = _grp addWaypoint [position _offobj, 0];

_wp2 = _grp addWaypoint [position _offobj, 50];

_wp3 = _grp addWaypoint [position _offobj, 50];

_wp3 = _grp addWaypoint [position _offobj, 50];

_wp3 = _grp addWaypoint [position _offobj, 50];

[_grp, 5] setWaypointType "CYCLE";

_recy = [_grp,_taginf,_disable] spawn {[_this select 0,_this select 1,_this select 2] call EVO_gRecy};

//hint format["tag=%1",_taginf];

_newgrps = _newgrps + [_grp];

};

//Radio defence

_grp = createGroup (east);

_unit = _grp createUnit ["SquadLeaderE", position _radio, [], 0, "FORM"];[_unit] join _grp;

_wp = _grp addWaypoint [position _radio, 0];

_wp2 = _grp addWaypoint [position _radio, 50];

_wp2 = _grp addWaypoint [position _radio, 50];

_wp2 = _grp addWaypoint [position _radio, 50];

_wp3 = _grp addWaypoint [position _radio, 50];

[_grp, 5] setWaypointType "CYCLE";

_recy = [_grp,_taginf,_disable] spawn {[_this select 0,_this select 1,_this select 2] call EVO_gRecy};

_newgrps = _newgrps + [_grp];

_i=0;

while {_i <= _inf} do

{

_grp = createGroup (east);

_unit = _grp createUnit ["SquadLeaderE", _pos, [], 300, "NONE"];[_unit] join _grp;

_posasl = getPosASL _unit;

if ((_posasl select 2) < 1.0) then

{

_unit setpos _pos;

};

_recy = [_grp,_taginf,_disable] spawn {[_this select 0,_this select 1,_this select 2] call EVO_gRecy};

if(round(random 1) == 1) then

{

_wp = _grp addWaypoint [_pos, 400];

_wp2 = _grp addWaypoint [_pos, 400];

_wp3 = _grp addWaypoint [_pos, 400];

[_grp, 3] setWaypointType "CYCLE";

};

_newigrps = _newigrps + [_grp];

_i = _i+1;

sleep 0.1;

};

_i=0;

while {_i <= _mec} do

{

_grp = createGroup (east);

_unit = _grp createUnit ["SoldierECrew", _pos, [], 300, "NONE"];

[_unit] join _grp;

_recy = [_grp,_tagmec,_disable] spawn {[_this select 0,_this select 1,_this select 2] call EVO_gRecy};

if(round(random 1) == 1) then

{

_wp = _grp addWaypoint [(_outpoints select 0), 0];

_wp2 = _grp addWaypoint [(_outpoints select 1), 0];

_wp3 = _grp addWaypoint [(_outpoints select 2), 0];

_wp4 = _grp addWaypoint [(_outpoints select 3), 0];

_wp5 = _grp addWaypoint [(_outpoints select 3), 0];

[_grp, 5] setWaypointType "CYCLE";

};

_newmgrps = _newmgrps + [_grp];

_i = _i+1;

sleep 0.1;

};

_newgrps = _newgrps+_newigrps+_newmgrps;

_i=0;

while {_i < count _newgrps} do

{

_unit = leader (_newgrps select _i);

if (leader _unit == _unit and _unit isKindOf "Man") then

{

_grp = group _unit;

_pos = position _unit;

if (_unit isKindOf "SoldierECrew") then

{

_allvecs = ["BMP2","BRDM2","UAZ_AGS30","UAZMG","T72","BRDM2_ATGM","D30","DSHKM","AGS"];

_posasl = getPosASL _unit1;

if ((_posasl select 2) < 1.0) then

{

_allvecs = ["BMP2","BRDM2","BRDM2_ATGM"];

};

_max = (count _allvecs)-1;

_vec = createVehicle [_allvecs select (round random _max), _pos, [], 0, "NONE"];

_vec addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}];

[_vec] call EVO_Lock;

_unit = _grp createUnit ["SoldierECrew", _pos, [], 300, "NONE"];

[_unit] join _grp;

if(typeOf _vec == "D30" or typeOf _vec == "DSHKM" or typeOf _vec == "AGS") then

{

(units _grp select 0) moveInGunner _vec;

(units _grp select 1) assignAsGunner _vec;

}

else

{

(units _grp select 0) moveInDriver _vec;

(units _grp select 1) moveInGunner _vec;

};

if ((round random 1) == 1) then

{

_vec2 = createVehicle [_allvecs select (round random _max), _pos, [], 0, "NONE"];

_vec2 addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}];

[_vec2] call EVO_Lock;

"SoldierECrew" createUnit [_pos, _grp];

"SoldierECrew" createUnit [_pos, _grp];

if(typeOf _vec2 == "D30") then

{

(units _grp select 2) moveInGunner _vec2;

(units _grp select 3) moveInCargo _vec2;

}

else

{

(units _grp select 2) moveInGunner _vec2;

(units _grp select 3) moveInDriver _vec2;

};

};

};

if (_unit isKindOf "SquadLeaderE") then

{

_allunits = ["SoldierEMG","SoldierEAT","SoldierEAT","SoldierEAT","SoldierESniper","SoldierEMedic","SoldierEG","SoldierEB","SoldierEAA","SoldierEAA"];

_max = (count _allunits)-1;

_count = (round random 6)+4;

_j = 0;

while {_j <= _count} do

{

_unit = _grp createUnit [_allunits select (round random _max), _pos, [], 10, "FORM"];

[_unit] join _grp;

_j = _j+1;

sleep 0.1;

};

};

{_x addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}]} forEach (units _grp);

/*

_allbeh = ["SAFE","AWARE","COMBAT","STEALTH"];

_max = (count _allbeh)-1;

_grp setBehaviour (_allbeh select (round random _max));

_allcom = ["YELLOW","RED"];

_max = (count _allcom)-1;

_grp setCombatMode (_allcom select (round random _max));

*/

if((random 1) > 0.75) then {_grp enableAttack true}else {_grp enableAttack false};

_grp setBehaviour "AWARE";

_allform = ["COLUMN","STAG COLUMN","WEDGE","ECH LEFT","ECH RIGHT","VEE","LINE"];

_max = (count _allform)-1;

_grp setFormation (_allform select (round random _max));

};

_i = _i + 1;

sleep 0.1;

};

if (debug) then {hint format["%1 inf=%2 mec=%3 tag=%4",(count list _list),_inf,_mec,_taginf]};

waitUntil {(count list _disable) == 0 or _exitcond};

if (not _exitcond) then

{

_i = 0;

while {_i < count _newgrps} do

{

if (not isNull(_newgrps select _i)) then

{

_del = [_newgrps select _i] spawn {[_this select 0] call EVO_Delete};

};

_i = _i + 1;

sleep 0.1;

};

};

rscripts=rscripts-1;

};

};

EVO_VecRc =

{

_time = 1+(random 1);

sleep _time;

vscripts=vscripts+1;

_vcl = _this select 0;

//if ((local server)) exitwith {deleteVehicle _vcl};

_rtime = _this select 1;

_respawnpoint = position _vcl;

_azimut = direction _vcl;

_civcars = [

"Skoda",

"SkodaBlue",

"SkodaRed",

"SkodaGreen",

"datsun1_civil_1_open",

"datsun1_civil_2_covered",

"datsun1_civil_3_open",

"hilux1_civil_1_open",

"hilux1_civil_2_covered",

"hilux1_civil_3_open",

"Bus_city",

"car_hatchback",

"car_sedan"];

_max = count _civcars;

_zone = createTrigger ["EmptyDetector", _respawnpoint ];

_zone setTriggerActivation ["WEST", "PRESENT", false];

_zone setTriggerArea [300, 300, 0, true];

_zone setTriggerStatements ["this", "", ""];

//_trgobj3 setTriggerTimeout [5, 10, 7, true ];

for [{_loop2=0}, {_loop2<1}, {_loop2=_loop2}] do

{

_cull = false;

_stime = _rtime;

for [{_loop=0}, {_loop<1}, {_loop=_loop}] do

{

sleep _time;

//if(_vcl == vtcar) then {hint "loop1"};

//if(count list _zone == 0 and (_vcl in list _zone)) then {deleteVehicle _vcl};

if(count list _zone == 0 and (_vcl distance _respawnpoint) < 10 and (count units _vcl == 0)) then {_cull = true;_loop=1};

if ((_vcl distance _respawnpoint) > 50 and (count units _vcl == 0)) then {_loop=1};

if(not alive _vcl) then {_loop=1};

//if ((_vcl distance _respawnpoint) > 50 and (count units _vcl == 0)) then {_loop=1};

};

if (_vcl in list airportin) then

{

_stime = 60;

};

_i = 0;

while {_i <= _stime} do

{

//if(_vcl == vtcar) then {hint "loop2"};

if (_i == _stime or _cull) then

{

_vcl removealleventhandlers "killed";

_vcl removealleventhandlers "getout";

_vcl removealleventhandlers "getin";

_vcl removealleventhandlers "IncomingMissile";

deleteVehicle _vcl;

for [{_loop3=0}, {_loop3<1}, {_loop3=_loop3}] do

{

if(count list _zone > 0) then {_loop3=1;_i = _stime};

sleep 1.0;

};

_vcl = (_civcars select round random (_max - 1)) createVehicle _respawnpoint;

_vcl setpos _respawnpoint;

_vcl setdir _azimut;

};

if (count units _vcl > 0) then {_i = _stime;};

_i = _i + 10;

if (_i < _stime) then {sleep 10.0}; //10 mins

};

sleep 1.0;

};

};

EVO_VecRm =

{

_time = 1+(random 1);

sleep _time;

vscripts=vscripts+1;

_vcl = _this select 0;

//if ((local server) and side _vcl != west) exitwith {deleteVehicle _vcl};

_class = _this select 1;

_rtime = _this select 2;

_respawnpoint = position _vcl;

_azimut = direction _vcl;

_zone = createTrigger ["EmptyDetector", _respawnpoint ];

_zone setTriggerActivation ["WEST", "PRESENT", false];

_zone setTriggerArea [300, 300, 0, true];

_zone setTriggerStatements ["this", "", ""];

//_trgobj3 setTriggerTimeout [5, 10, 7, true ];

if(_vcl isKindOf "Air") then

{

_warning = _vcl addEventHandler["IncomingMissile",{if ((_this select 1) in aaweapons) then

{

mtar = driver (_this select 0);

publicVariable "mtar";

}}];

};

for [{_loop2=0}, {_loop2<1}, {_loop2=_loop2}] do

{

_cull = false;

_stime = _rtime;

for [{_loop=0}, {_loop<1}, {_loop=_loop}] do

{

sleep _time;

//if(_vcl == testcar) then {hint "loop1"};

//if(count list _zone == 0 and (_vcl in list _zone)) then {deleteVehicle _vcl};

if(count list _zone == 0 and (_vcl distance _respawnpoint) < 10 and (count units _vcl == 0)) then {_cull = true;_loop=1};

if ((_vcl distance _respawnpoint) > 50 and (count units _vcl == 0)) then {_loop=1};

if(not alive _vcl) then {_loop=1};

//if ((_vcl distance _respawnpoint) > 50 and (count units _vcl == 0)) then {_loop=1};

};

if (_vcl in list airportin) then

{

_stime = 240;

};

_i = 0;

while {_i <= _stime} do

{

//if(_vcl == testcar) then {hint "loop2"};

if (_i == _stime or _cull) then

{

_vcl removealleventhandlers "killed";

_vcl removealleventhandlers "getout";

_vcl removealleventhandlers "getin";

_vcl removealleventhandlers "IncomingMissile";

deleteVehicle _vcl;

for [{_loop3=0}, {_loop3<1}, {_loop3=_loop3}] do

{

if(count list _zone > 0) then {_loop3=1;_i = _stime};

sleep 1.0;

};

_vcl = _class createVehicle _respawnpoint;

_vcl setpos _respawnpoint;

_vcl setdir _azimut;

if(_vcl isKindOf "Air") then

{

_warning = _vcl addEventHandler["IncomingMissile",{if ((_this select 1) in aaweapons) then

{

mtar = driver (_this select 0);

publicVariable "mtar";

}}];

};

};

if (count units _vcl > 0) then {_i = _stime;};

_i = _i + 10;

if (_i < _stime) then {sleep 10.0}; //10 mins

};

sleep 1.0;

};

};

EVO_VecR =

{

_time = 1+(random 1);

sleep _time;

vscripts=vscripts+1;

_vcl = _this select 0;

_class = _this select 1;

_name = _this select 2;

_oldpos = _this select 3;

_died = false;

_vclm = format ["%1", _vcl];

_rmess = format [localize "EVO_043", _name];

_vcl2=objNull;

_markerobj = createMarker[_vclm,[getpos _vcl select 0,getpos _vcl select 1]];

_markerobj setMarkerColor "ColorRed";

_markerobj setMarkerType "join";

_markerobj setMarkerSize [0.0, 0.0];

_rtime = 0;

if(_vcl isKindOf "Air") then

{

_warning = _vcl addEventHandler["IncomingMissile",{if ((_this select 1) in aaweapons) then

{

mtar = driver (_this select 0);

publicVariable "mtar";

}}];

};

EVO_Frew =

{

//if(_vcl == testcar) then {hint format["%1",_died, fuel _vcl]};

if(_died and (damage _vcl) == 0) then

{

if (_vcl in list reng1) then

{

epoint = eng1;

publicVariable "epoint";

};

if (_vcl in list reng2) then

{

epoint = eng2;

publicVariable "epoint";

};

if (_vcl in list reng3) then

{

epoint = eng3;

publicVariable "epoint";

};

if (_vcl in list reng4) then

{

epoint = eng4;

publicVariable "epoint";

};

_died = false;

_rtime = time+600;

}

};

for [{_mloop=0}, {_mloop<1}, {_mloop=_mloop}] do

{

for [{_sloop=0}, {_sloop<1}, {_sloop=_sloop}] do

{

deleteMarker _markerobj;

if (not (_vcl in list airportin) and (count crew _vcl) == 0 and (alive _vcl)) then

{

_markerobj = createMarker[_vclm,[getpos _vcl select 0,getpos _vcl select 1]];

_markerobj setMarkerText format ["%1", _name];

if (fuel _vcl == 0) then

{

_markerobj setMarkerText format ["%1 needs repair", _name];

}

else

{

_markerobj setMarkerText format ["%1", _name];

};

_markerobj setMarkerColor "ColorBlue";

_markerobj setMarkerType "join";

_markerobj setMarkerSize [0.5, 0.5];

};

for [{_dloop=0}, {_dloop<1}, {_dloop=_dloop}] do

{

sleep _time;

[] call EVO_Frew;

if (not (alive _vcl)) then {_dloop=1};

if (not (_vcl in list airportin) and count (crew _vcl) == 0) then {_dloop=1};

if(_died and (fuel _vcl) > 0) then {_dloop=1};

};

_ntime = time+600;

for [{_loop=0}, {_loop<1}, {_loop=_loop}] do

{

sleep _time;

[] call EVO_Frew;

if (not (alive _vcl)) then {_loop=1};

if (not (_vcl in list airportin) and count (crew _vcl) == 0 and (fuel _vcl > 0)) then {_loop=1};

if (time > _ntime) then {_loop=1};

if(_died and (fuel _vcl) > 0) then {_loop=1};

};

if (not (alive _vcl)) then {_sloop=1};

//hint "";

sleep 10.0;

//hint format ["loop %1 %2 %3",(count crew _vcl),(alive _vcl),(fuel _vcl)];

};

sleep 10.0;

_respawnpoint = position _vcl;

_posasl = getPosASL _vcl;

_azimut = direction _vcl;

if (_posasl select 2 < 1.0) then

{

//hint format["%1 z",_respawnpoint select 2];

sleep 3200.0;

_vcl removealleventhandlers "killed";

_vcl removealleventhandlers "getout";

_vcl removealleventhandlers "getin";

_vcl removealleventhandlers "IncomingMissile";

deleteVehicle _vcl;

_vcl2 = _class createVehicle [10000+(random 1000),10000+(random 1000),0];

if(_vcl2 isKindOf "Air") then

{

_warning = _vcl2 addEventHandler["IncomingMissile",{if ((_this select 1) in aaweapons) then

{

mtar = driver (_this select 0);

publicVariable "mtar";

}}];

};

_vcl2 setpos _oldpos;

_vcl2 setdir 0.0;

}

else

{

_vcl2 = _class createVehicle [10000+(random 1000),10000+(random 1000),0];

if(_vcl2 isKindOf "Air") then

{

_warning = _vcl2 addEventHandler["IncomingMissile",{if ((_this select 1) in aaweapons) then

{

mtar = driver (_this select 0);

publicVariable "mtar";

}}];

};

_vcl2 setfuel 0;

sleep 1.0;

_vcl setpos [0+(random 1000),0+(random 1000),-10];

_vcl2 setpos [(_respawnpoint select 0),(_respawnpoint select 1),(_respawnpoint select 2)+2];

_vcl2 setdir _azimut;

_vcl2 setdammage 0.60;

_vcl removealleventhandlers "killed";

_vcl removealleventhandlers "getout";

_vcl removealleventhandlers "getin";

_vcl removealleventhandlers "IncomingMissile";

if(time > _rtime) then {_died = true};

deleteVehicle _vcl;

};

_vcl = _vcl2;

};

};

EVO_VecRAA =

{

_time = 1+(random 1);

sleep _time;

vscripts=vscripts+1;

_vcl = _this select 0;

_grp = group _vcl;

//if ((local server) and side _vcl != west) exitwith {deleteVehicle _vcl};

_class = _this select 1;

_rtime = _this select 2;

_exitcond = _this select 3;

_respawnpoint = position _vcl;

_azimut = direction _vcl;

_zone = createTrigger ["EmptyDetector", _respawnpoint ];

_zone setTriggerActivation ["WEST", "PRESENT", false];

_zone setTriggerArea [1200, 1200, 0, true];

_zone setTriggerStatements ["this", "", ""];

_unitm = format ["%1", _vcl];

_markerobj = createMarker[_unitm,[getpos _vcl select 0,getpos _vcl select 1]];

_markerobj setMarkerShape "ELLIPSE";

_markerobj setMarkerColor "ColorRedAlpha";

_markerobj setMarkerBrush "Cross";

_markerobj setMarkerSize [1200, 1200];

EVO_MakeShilka =

{

_vcl = _class createVehicle _respawnpoint;

_vcl setpos _respawnpoint;

_vcl setdir _azimut;

_grp = createGroup (east);

_unit1 = _grp createUnit ["SoldierECrew", _respawnpoint, [], 300, "NONE"];

_unit2 = _grp createUnit ["SoldierECrew", _respawnpoint, [], 300, "NONE"];

_unit3 = _grp createUnit ["SoldierECrew", _respawnpoint, [], 300, "NONE"];

[_unit1,_unit2,_unit3] join _grp;

{_x setSkill 1;_x addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}]} forEach (units _grp);

_vcl addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}];

_recy = [_grp,"none",objNull] spawn {[_this select 0,_this select 1,_this select 2] call EVO_gRecy};

sleep 1.0;

_unit1 moveInCommander _vcl;

_unit2 moveInGunner _vcl;

_unit3 moveInDriver _vcl;

[_vcl] call EVO_Lock; //edit

};

_cull = false;

for [{_loop2=0}, {_loop2<1}, {_loop2=_loop2}] do

{

sleep _time;

//_cull = false;

_stime = _rtime;

//if(_vcl == testaa) then {hint format ["loop1 %1 %2",(list _zone),count list _zone,_loop4]};

if(alive _vcl) then {_markerobj setMarkerPos position _vcl};

if(count list _zone == 0 and not _cull) then

{

_cull = true;

_del = [_grp] spawn {[_this select 0] call EVO_Delete};

};

if((count list _zone > 0) and _cull) then

{

_cull = false;

[] call EVO_MakeShilka;

};

if(not alive _vcl) then

{

if (not _cull) then

{

deleteMarker _markerobj;

_loop2 = 1;

/*

sleep 3200.0;

if(_exitcond) then {_loop2=1};

[] call EVO_MakeShilka;

_unitm = format ["%1", _vcl];

_markerobj = createMarker[_unitm,[getpos _vcl select 0,getpos _vcl select 1]];

_markerobj setMarkerShape "ELLIPSE";

_markerobj setMarkerColor "ColorRedAlpha";

_markerobj setMarkerBrush "Cross";

_markerobj setMarkerSize [1200, 1200];

*/

};

};

};

};

Share this post


Link to post
Share on other sites

since your problem seems to be in the function EVO_Erec which

is called from trigger "acha" then I'd say use the basic debug method

I mentioned earlier in EVO_Erec.

the problem might be that the array chalist is empty, you haven't posted how thats initialized.

Share this post


Link to post
Share on other sites

But wouldn't that be settled with this line that is in both the makepara and reinforce script?

Put it in the same suntax as the other objective areas banghead.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_alist = acha;

_elist = chalist;

Share this post


Link to post
Share on other sites

I don't play evo let only edit it so all i know is what I think a error msg leads to, which in my opinon is chalist...i might be wrong.

did you make the variable chalist or is it part of the orginal evo?

Share this post


Link to post
Share on other sites

Well a LITTLE bit of forward progress -

I got the Radio Tower to spawn and show up on the briefing map. The squad that defends the radio tower also spawned. This was tied to the radar that I thought I had put in that new zone, but did not.

Still getting the error on the Enableai part of the script for the AI (infantry and armored) that defend the town.

So, while not fully functional, it's better than it was. Now if I can just figure out what's making the EnableAi not function.....

Share this post


Link to post
Share on other sites

Apparently, it's not picking up on the three spawn markers:

charef, charefa, and charefb

No idea why though. Everything looks in place crazy_o.gif

Share this post


Link to post
Share on other sites

amuse me and change

change trigger name="chanlist";

to

name="chalist";

then at least I'll know chalist will equal something.

or post the results of putting

player sidechat format["%1",_this];

after

EVO_Erec =

{

in EventsS.sqf

Share this post


Link to post
Share on other sites

I've been pooring over the script files trying to find an obvious typo...............

Thanks for catching that! When I get home, I'll change that and I'm pretty sure that will be it.

notworthy.gif

Share this post


Link to post
Share on other sites

LOL! Yup - that blasted "n" was it biggrin_o.gif

Thanks for the help man smile_o.gif

I cna pat myself on the back for figuring it out on my own, but I gotta give credit to you for showing where my over zealous typing figners got the best of me...again!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×