Jump to content

pcc

Member
  • Content Count

    195
  • Joined

  • Last visited

  • Medals

Everything posted by pcc

  1. Wouldn't the variable data get overridden by the initialization when the script is run again? BIS has these notes in the script. Not sure how to pass it as _data.
  2. I'm stuck at setting a condition where it fires 5 times per patrol point. Tried using variable _a for counting but it complains about undefined variable. If I define it, then the loop would clear its count. if (Leader _team Distance _destination > 30 && (_a < 5)) then { _a = _a + 1; if (_type In [Localize "STR_WF_TEAMINF",Localize "STR_WF_TEAMMECH"]) then {_team SetVariable ["transportDisembarkRange",(_location GetVariable "range") * 1.2]} else {_team SetVariable ["transportDisembarkRange",-1]}; [_team,([_destination,_radius,_radius * 1.3] Call GetRandomPosition)] Call BIS_WF_AITeamMove; _team SetVariable ["missionLocation",_location]; _timeNextMove = time + 90; _base = Call Compile Format ["%1Base",WFSideText _side]; _position = getPos _base; [_side,_position,_destination,_radius,2,2] Spawn BIS_WF_FireLocalArtillery; };
  3. I'm having trouble getting AI air team to randomize when it picks a team from Config_Teams.sqf. I've tried setting all aircraft cost and points to 0 and setting all team air team abilities to _TEAMTYPENORMAL. But it still seems to avoid using certain teams and picks certain teams over and over again. Sometimes it would always buy planes and other times will only use choppers despite many respawns. Also, resorted to just having one air team template with one unit in Config_Teams.sqf and randomize the unit in Server_BuyUnit.sqf This forces whatever unit the air team AI buys to randomize, however, it respawns if units that are picked are not listed in the Config_Teams.sqf. I notice that dedicated PatrolBase teams will keep the randomized units, but they don't move to capture locations. Is there the a way to force the air team to keep the units that gets added to its team like the dedicated AI teams? Edit: Might've been something with the number of crew listed in Config_AircraftFactory.sqf. Added one extra crew to all planes and redid the Config_Teams.sqf in OA warfare and team selection appears to be random now.
  4. Default warfare only spawns 1 AI gunner for all vehicles regardless of number turrets. I tried adding while loop, but still only get 1 AI gunner. if (_vehicle EmptyPositions "gunner" > 0) then { g = 0; while { g <= (_vehicle EmptyPositions "gunner") } do { _gunner = _team CreateUnit [_soldierName,_factoryPosition,[],0.2,"FORM"]; [_gunner] AllowGetIn true; [_gunner] Join _team; _gunner MoveInGunner _vehicle; [_gunner,_side] Call BIS_WF_InitUnit; g = g + 1; }; };
  5. Thanks, I did add || _templateType == Localize "STR_WF_TEAMAIR and it caused the trouble with other OA choppers when it was fine before. if (_templateType == Localize "STR_WF_TEAMARM" || _templateType == Localize "STR_WF_TEAMAIR) then { _vehicle SetVariable["crew",Crew _vehicle]; _vehicle AddEventHandler ["GetOut",{_this Spawn BIS_WF_AIVehicleAbandoned}]; }; Tested with default Server_BuyUnit.sqf, unfortunately issue with AH6 persists. :( I must've messed up somewhere when trying to use default Server_BuyUnit.sqf. Now it doesn't respawn loop but it always seem to buy one less than listed in Config_Teams.sqf. Found out that moving the leader into the chopper was causing the conflict in Server_BuyUnit.sqf. if ((_templateType == Localize "STR_WF_TEAMMECH" || _templateType == Localize "STR_WF_TEAMARM" || _templateType == Localize "STR_WF_TEAMAIR") && _leader == Vehicle _leader) then { [_leader] AllowGetIn true; _leader MoveInDriver _vehicle; } What's the conflict with moving leader into chopper like the other teams? _m = _m + [2]; in Config_AircraftFactory.sqf seems to also play a part in the spawn issue. For example: setting it to 1, it will always buy 1 less that listed in Config_Teams. But no respawn loop. Setting it to 2 will trigger respawn loop if more than unit is listed in Config_Teams.
  6. I'd like to have certain helicopters spawn flying instead of on the ground. In Server_BuyUnit.sqf, I've tried if ((typeOf _unit) in ["AH1Z","AH64D"]) then { { _vehicle createVehicle ["_unit", _position, [], 0, "FLY"]; }; But the units still spawn on the ground instead of flying.
  7. Really weird, started with clean Config_Teams.sqf and Config_Squads.sqf, and now all OA choppers triggers the respawn loop in A2 warfare. Single AH6J_EP1 wouldn't even spawn at all. Wish there was some sort of error message to indicate the cause.
  8. I'm trying to count the group size "west" of vehicle spawned by BIS_fnc_spawnVehicle so that it stop after reaching a certain amount. if (side _team == west && (count units group west < 3)) then { aircrafts = [[((Position _base select 0) + sin (random 360) * (random 50)), ((Position _base select 1) + cos (random 360) * (random 50))], (_dir), "A10", west] call BIS_fnc_spawnVehicle; ... but I'm getting this error Error position: <group west < 3)) then Error group: Type Side, expected Object
  9. I'm using this in Mission_CaptureAI.sqf, does count group _team return the size of warfare AI team, or the A10 team?
  10. I tried that too and it also respawn loops. Seems like some unknown conflict with this specific chopper. Other choppers are fine though, weird. The spawn loops happens in both A2 and OA warfare.
  11. Warfare error that happens randomly. I think it's related to team respawn. Error in expression <nstants GetVariable "BASERANGE")) then {_driver DoMove ([Leader _team,6,15] Call> Error position: <_driver DoMove ([Leader _team,6,15] Call> Error Undefined variable in expression: _driver File CA\Warfare2\Scripts\Server\Functions\Server_BuyUnit.sqf, line 119
  12. I'm getting these errors after adding if (Count _sites < 1) then {...}; in Commander_UpdateBase.sqs. Error in expression <};> Error position: <};> Error Missing { But it's not missing the brackets. if (Count _sites < 1) then { _sites Set[_positionSlot,true] _script = _scripts Select _type [_type,_side,_position,_directions Select _positionSlot,true] ExecVM (corePath + Format["Server\Construction\Construction_%1.sqf",_script]) [_type,_side,_position,_directions Select _positionSlot,true] ExecVM (corePath + Format["Server\Construction\Construction_%1.sqf",_script]) }; What's wrong with the syntax?
  13. Tried to post the .sqs file but its too long. But yea, that's probably it. _sites was an array. Should be counting object instead. Got a semi workaround but sometimes structures is still built 3 times instead of twice, but at least no errors. _sites Set[_positionSlot,true] _script = _scripts Select _type [_type,_side,_position,_directions Select _positionSlot,true] ExecVM (corePath + Format["Server\Construction\Construction_%1.sqf",_script]) _objects = NearestObjects[_position,["house"],15] if (Count _objects > 2) then {Goto "UpdateDefenses"}; [_type,_side,_position,_directions Select _positionSlot,true] ExecVM (corePath + Format["Server\Construction\Construction_%1.sqf",_script])
  14. It's from warfare module. I want it to build the structure twice. If I run it without the if statement no error, but with if statement it complains. _sites Set[_positionSlot,true] _script = _scripts Select _type [_type,_side,_position,_directions Select _positionSlot,true] ExecVM (corePath + Format["Server\Construction\Construction_%1.sqf",_script]) [_type,_side,_position,_directions Select _positionSlot,true] ExecVM (corePath + Format["Server\Construction\Construction_%1.sqf",_script]) No error. if (Count _sites < 1) then { _sites Set[_positionSlot,true] _script = _scripts Select _type [_type,_side,_position,_directions Select _positionSlot,true] ExecVM (corePath + Format["Server\Construction\Construction_%1.sqf",_script]) [_type,_side,_position,_directions Select _positionSlot,true] ExecVM (corePath + Format["Server\Construction\Construction_%1.sqf",_script]) }; Error.
  15. I tried to give east AI with dedicated mission defend base ACM, but not sure how to set that condition with if statement because there doesn't seem to be a team string name for defend base like spec ops and etc. _teamType = [_team] Call BIS_WF_GetTeamTemplateTypeName; if (_teamType == Localize "STR_WF_TEAMINF" && (side _leader == east)) then { //acm }; Tried using "" but doesn't work. Edit: Actually it works, the ACM units just took a long time to appear despite max intensity.
  16. I commented out the unit count check in modules.pbo but the ACM still stops. //Shut down if the group does not contain at least one other unit. //if ((count _syncObjs) == 0) exitWith {debugLog "Log: [ACM] Shutting down. No units were synchronized to the ACM."}; Is there a way to force ACM to keep running even after groups wipe out?
  17. Still spawning on ground. if (!(_unit Call BIS_WF_IsSoldier)) then { Private["_commander","_crewName","_distance","_driver","_factoryPosition","_gunner","_leader","_pilotName","_soldierName","_templateType","_vehicle"]; _type = typeOf _unit; if (_type in ["AH1Z","AH64D"]) then { { _vehicle = createVehicle [_type, _position, [], 0, "FLY"]; }; Warfare already gives the crew when vehicle spawns.
  18. Thanks, both recon and capture artillery works in A2 warfare. But in warfare OA its throwing these errors. Edit: Found the typo in config artillery of warfare OA
  19. In warfare Config_Structures.sqf, Russian kord high names are incorrect. _v = _v + ["DSHKM"]; _n = _n + ["DSHKM_RU"]; Should be _v = _v + ["DShKM"]; _n = _n + ["KORD_high"]; Also, the m6 linebacker, has the same issue the tunguska had before patch. It doesn't prefer to use its missiles enough against aircraft. Maybe its cost is set too high as well. Warfare recon mission completion/cancel error Error in expression <&& ((taskState _task) == "Created") && (_taskDist < _minDist)) then {_minDist = > Error position: <_taskDist < _minDist)) then {_minDist = > Error Undefined variable in expression: _taskdist File CA\Warfare2\Scripts\Client\Client_UpdateMissionMarkers.sqf, line 206 Serialization of Display variables is not implemented Error in expression <&& ((taskState _task) == "Created") && (_taskDist < _minDist)) then {_minDist = > Error position: <_taskDist < _minDist)) then {_minDist = > Error Undefined variable in expression: _taskdist File CA\Warfare2\Scripts\Client\Client_UpdateMissionMarkers.sqf, line 206 Error in expression <onTasks Select _count1; _taskLocation = _taskIter Select 2; if ((_taskIter Sele> Error position: <_taskIter Select 2; if ((_taskIter Sele> Error Undefined variable in expression: _taskiter File CA\Warfare2\Scripts\Client\Client_UpdateMissionMarkers.sqf, line 103
  20. Mission_CaptureAI.sqf Mission_ReconAI.sqf Cool :D, the base mortar is firing, also added spawn to Mission_ReconAI.sqf for possible AI HQ kill. LOL However, I'm getting error, after they fire.
  21. Clean warfare doesn't generate the errors. But if I call it from my mission it gets errors even with unmodified file from warfare2.pbo [] Call Compile PreprocessFileLineNumbers ("Common\Config\Config_Teams.sqf"); Warfare OA Config_Teams.sqf, doesn't generate errors.
  22. Do you mean in Mission_CaptureServer.sqf, or in one of the files in Server folder? I'm not sure which files to use from Server folder. For side, could be it any, so both bluefor and opfor commander can use it? For _position how do I assign it with any available artillery on map? Tried in Mission_CaptureCommanderAI.sqf, but not sure make _side all sides and _HQ all locations instead. [_side,_HQ,_hostileLocations,_radius,2,2] Spawn BIS_WF_FireLocalArtillery;
  23. After installing the addon, I get this warning. CA content doesn't seem to load. I'm using beta of OA and A2 Warning Message: Script CA\Warfare2\Scripts\Server\Construction\Construction_any.sqf not found Doesn't matter if I removed the addon, it still gives me the error. Fresh install clears it. Edit found a mission typo that caused it.
  24. There are 2 Config_Squads.sqf, one in warfare2 and warfare2_e. The one in warfare2_e is bugged as its missing -1 and throws script errors. Should be removed or replaced. for [{_count1 = Count WestTeamTemplateFactionIndex} for [{_count1 = Count EastTeamTemplateFactionIndex} for [{_count1 = Count ResistanceTeamTemplateFactionIndex} the lines should be like in warfare2 for [{_count1 = Count WestTeamTemplateFactionIndex - 1} for [{_count1 = Count EastTeamTemplateFactionIndex - 1} for [{_count1 = Count ResistanceTeamTemplateFactionIndex - 1} In bear rising scenario got this error at start Warning Message: Script CorePatch\CorePatch_WF\Scripts\Server\Server_UpdateAirport.sqf not found
×