Jump to content

[HOWTO] WAI rpg turret with DZMS


Recommended Posts

So ive started up my epoch server running WAI and DZMS, they run fine together and really get that challanging missions atmosphere going. Untill i change the turrets from the reworked WAI () from M2 to RPG like described down here.

Spoiler 

WEB11, on 24 Jan 2014 - 7:33 PM, said:snapback.png

 

I have not had many problems with vehicles and missions. You can change the turrents to a missile turret! Like so:

 

[[[(_position select 0) + 10, (_position select 1) -15, 0]], //position(s) (can be multiple).
"M2StaticMG", //Classname of turret
0.7,                     //Skill level 0-1. Has no effect if using custom skills
"USMC_LHD_Crew_Yellow",                 //Skin "" for random or classname here.
1,                         //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
2,                         //Number of magazines. (not needed if ai_static_useweapon = False)
"",                         //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
"Random",                 //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
true                        // mission true
] call spawn_static;

 

Change this line: 

 

"SPG9_TK_INS_EP1", //Classname of turret

 

This is a missile launcher turret. You also don't need to worry if people will pick up RPG's this way. The turrets are not able to be used once they die. 

It does not lock on so it won't be too OP. But bare in mind that people driving by the missions might get killed.

 

 

Another Method that was developed by other used to add RPG's to AI:

 

1) Open SpawnGroup.sqf in WAI/custom/ folder.

Quote

 

To remove RPG once AI is dead open ai_killed.sqf

Quote

 

All credit goes to the original author and WAI, I am merely keeping this information alive.

 

Next I want to find a way to give AI units NVGs, if anyone has that info please share it.

Does any1 have any idea why the WAI missions stop spawning after i change only the lil "M2StaticMG", //Classname of turret into "SPG9_TK_INS_EP1", //Classname of turret 

There are btr-90HQ's on my server so something for the AI to take m down with would be usefull. DZMS already has AI with rpgs in there so i dont have to worry bout that.

ive added my WAI.zip folder down here

WAI.zip

Link to comment
Share on other sites

I attached all the files, Ill move this thread to the proper place im sorry. You are right, i did add the tutorial to show you what i did and didnt work. 

 

Basically in the missions i changed all these lines

//Turrets
[[[(_position select 0) + 10, (_position select 1) + 10, 0],[(_position select 0) + 10, (_position select 1) - 10, 0]],"M2StaticMG",0.8,"Bandit2_DZ",0,2,"","Random",true] call spawn_static;

to these

//Turrets
[[[(_position select 0) + 10, (_position select 1) + 10, 0],[(_position select 0) + 10, (_position select 1) - 10, 0]],"SPG9_Ins",0.8,"Bandit2_DZ",0,2,"","Random",true] call spawn_static;
 
This is the arma2OAserver.rpt

== D:\steam\steamapps\common\arma 2 operation arrowhead\Expansion\beta\arma2oaserver.exe
== "D:\steam\steamapps\common\arma 2 operation arrowhead\Expansion\beta\arma2oaserver.exe" -mod=EXPANSION\beta;EXPANSION\beta\Expansion;EXPANSION;ca;@DayZ_Epoch1042;1917\@bliss -port=3340 -profiles=1917 -config=1917\server-iiFvU.cfg -cfg=1917\arma2.cfg -name=cfgdayzDEFAULT -world=Chernarus -cpuCount=2 -exThreads=1 -noSound
=====================================================================
Exe timestamp: 2013/09/25 08:36:20
Current time: 2014/05/11 08:41:20

Version 1.62.103718
Item STR_EPOCH_BULK_DESC_MP5SD listed twice
Item STR_ACTIONS_BUILD listed twice
Item STR_EQUIP_NAME_41 listed twice
Item STR_EQUIP_DESC_41 listed twice
Updating base class ->NonStrategic, by Ca\config.bin/CfgVehicles/HouseBase/
Updating base class ->HouseBase, by Ca\config.bin/CfgVehicles/Ruins/
Updating base class ->DestructionEffects, by Ca\config.bin/CfgVehicles/House/DestructionEffects/
Updating base class ->FlagCarrierCore, by ca\ca_pmc\config.bin/CfgVehicles/FlagCarrier/
Updating base class ->VehicleMagazine, by ca\weapons\config.bin/CfgMagazines/14Rnd_FFAR/
Updating base class ->PistolCore, by ca\weapons\config.bin/cfgWeapons/Pistol/
Updating base class ->LauncherCore, by ca\weapons\config.bin/cfgWeapons/RocketPods/
Updating base class ->RocketPods, by ca\weapons\config.bin/cfgWeapons/FFARLauncher/
Updating base class ->Default, by ca\weapons\config.bin/cfgWeapons/ItemCore/
Updating base class ->Citizen, by ca\characters2\config.bin/CfgVehicles/Citizen1/
Updating base class ->SkodaBase, by ca\wheeled\config.bin/CfgVehicles/car_sedan/
Updating base class ->House, by ca\misc3\config.bin/CfgVehicles/Land_Fire/
Updating base class ->House, by ca\misc3\config.bin/CfgVehicles/Land_A_tent/
Updating base class ->Camp_base, by ca\misc3\config.bin/CfgVehicles/ACamp/
Updating base class ->Car, by ca\wheeled2\lada\config.bin/CfgVehicles/Lada_base/
Updating base class StreetLamp_EP1->StreetLamp, by z\addons\dayz_code\config.bin/CfgNonAIVehicles/Land_Lamp_Small_EP1/
Updating base class StreetLamp_EP1->StreetLamp, by z\addons\dayz_code\config.bin/CfgNonAIVehicles/Land_Lamp_Street1_EP1/
Updating base class StreetLamp_EP1->StreetLamp, by z\addons\dayz_code\config.bin/CfgNonAIVehicles/Land_Lamp_Street2_EP1/
Updating base class StreetLamp_EP1->StreetLamp, by z\addons\dayz_code\config.bin/CfgNonAIVehicles/Land_Lampa_Ind_EP1/
Updating base class StreetLamp_EP1->StreetLamp, by z\addons\dayz_code\config.bin/CfgNonAIVehicles/Land_PowLines_Conc2L_EP1/
Updating base class StreetLamp_BaseMediumOrange->StreetLamp, by z\addons\dayz_code\config.bin/CfgNonAIVehicles/Land_lampa_sidl/
Updating base class StreetLamp_BaseMediumOrange->StreetLamp, by z\addons\dayz_code\config.bin/CfgNonAIVehicles/Land_lampa_sidl_2/
Updating base class StreetLamp_BaseMediumOrange->StreetLamp, by z\addons\dayz_code\config.bin/CfgNonAIVehicles/Land_lampa_sidl_3/
Updating base class StreetLamp_BaseWeakYellow->StreetLamp, by z\addons\dayz_code\config.bin/CfgNonAIVehicles/Land_lampa_ind/
Updating base class StreetLamp_BaseWeakYellow->StreetLamp, by z\addons\dayz_code\config.bin/CfgNonAIVehicles/Land_lampa_ind_zebr/
Updating base class RscStandardDisplay->, by z\addons\dayz_code\config.bin/RscDisplayStart/
Cannot delete class CA_DebriefingInfo, it is referenced somewhere (used as a base class probably).
Cannot delete class CA_DebriefingInfo, it is referenced somewhere (used as a base class probably).
Updating base class RscShortcutButton->RscShortcutButtonMain, by z\addons\dayz_code\config.bin/RscDisplayMain/controls/CA_Exit/
Updating base class RscText->, by z\addons\dayz_code\config.bin/RscTitles/Default/
Updating base class zZombie_Base->zZombie_new_Base, by z\addons\dayz_code\config.bin/CfgVehicles/z_villager1/
Updating base class zZombie_Base->zZombie_new_Base, by z\addons\dayz_code\config.bin/CfgVehicles/z_worker1/
Updating base class Soldier_Crew_PMC->Soldier_Bodyguard_M4_PMC, by z\addons\dayz_code\config.bin/CfgVehicles/SurvivorW2_DZ/
Updating base class HighCommand->Logic, by z\addons\dayz_code\config.bin/CfgVehicles/HighCommandSubordinate/
Updating base class ->ViewOptics, by z\addons\dayz_code\config.bin/CfgVehicles/Mi17_base/Turrets/MainTurret/ViewOptics/
Updating base class HouseBase->, by z\addons\dayz_code\config.bin/CfgVehicles/House/
Updating base class NonStrategic->BuiltItems, by z\addons\dayz_code\config.bin/CfgVehicles/Fort_RazorWire/
Updating base class MeleeHatchet->MeleeWeapon, by z\addons\dayz_code\config.bin/CfgWeapons/MeleeCrowbar/
Updating base class VehicleMagazine->CA_Magazine, by z\addons\dayz_code\config.bin/CfgMagazines/29Rnd_30mm_AGS30/
Updating base class VehicleMagazine->CA_Magazine, by z\addons\dayz_code\config.bin/CfgMagazines/48Rnd_40mm_MK19/
Updating base class 4000Rnd_762x51_M134->CA_Magazine, by z\addons\dayz_code\config.bin/CfgMagazines/2000Rnd_762x51_M134/
Updating base class VehicleMagazine->CA_Magazine, by z\addons\dayz_code\config.bin/CfgMagazines/100Rnd_127x99_M2/
Updating base class VehicleMagazine->CA_Magazine, by z\addons\dayz_code\config.bin/CfgMagazines/50Rnd_127x107_DSHKM/
Updating base class Hatchet_Swing->Melee_Swing, by z\addons\dayz_code\config.bin/CfgMagazines/crowbar_swing/
Updating base class CA_Magazine->Melee_Swing, by z\addons\dayz_code\config.bin/CfgMagazines/Hatchet_Swing/
Updating base class ->Plane, by ca\air2\mv22\config.bin/CfgVehicles/MV22/
Updating base class ViewOptics->, by ca\air2\uh1y\config.bin/CfgVehicles/UH1_Base/Turrets/MainTurret/ViewOptics/
Updating base class ->HouseBase, by ca\misc_e\config.bin/CfgVehicles/House/
Updating base class ->Land_CamoNet_EAST, by ca\misc_e\config.bin/CfgVehicles/Land_CamoNet_EAST_EP1/
Updating base class ->Land_CamoNetB_EAST, by ca\misc_e\config.bin/CfgVehicles/Land_CamoNetB_EAST_EP1/
Updating base class ->Sign_1L_Noentry, by ca\misc_e\config.bin/CfgVehicles/Sign_1L_Noentry_EP1/
Updating base class ->Sign_circle, by ca\misc_e\config.bin/CfgVehicles/Helper_Base_EP1/
Updating base class ->Rifle, by ca\weapons_baf\config.bin/cfgWeapons/BAF_AS50_scoped/
Updating base class ->Rifle, by ca\weapons_e\config.bin/cfgWeapons/M60A4_EP1/
Updating base class ->M249, by ca\weapons_e\config.bin/cfgWeapons/M249_EP1/
Updating base class ->M249, by ca\weapons_e\config.bin/cfgWeapons/M249_m145_EP1/
Updating base class ->m107, by ca\weapons_e\m107\config.bin/CfgWeapons/m107_TWS_EP1/
Updating base class ->M240, by ca\weapons_e\m240\config.bin/CfgWeapons/m240_scoped_EP1/
Updating base class ->V3S_Base, by ca\wheeled_e\v3s\config.bin/CfgVehicles/V3S_Base_EP1/
Updating base class ->V3S_Base_EP1, by ca\wheeled_e\v3s\config.bin/CfgVehicles/V3S_Refuel_TK_GUE_EP1/
Updating base class House->DZE_OpenHouse, by warehouse\config.bin/CfgVehicles/Land_Ind_Pec_03/
Updating base class ->Helicopter, by ca\air_e\ah6j\config.bin/CfgVehicles/AH6_Base_EP1/
Updating base class ->Plane, by ca\air_e\an2\config.bin/CfgVehicles/An2_Base_EP1/
Updating base class ->CH47_base_EP1, by ca\air_e\ch47\config.bin/CfgVehicles/CH_47F_EP1/
Updating base class ViewOptics->, by ca\air_e\uh1h\config.bin/CfgVehicles/UH1H_base/Turrets/MainTurret/ViewOptics/
Updating base class ->Soldier_Base_PMC, by ca\characters_pmc\config.bin/cfgVehicles/Soldier_Crew_PMC/
Updating base class ->Soldier_Base_PMC, by ca\characters_pmc\config.bin/cfgVehicles/Soldier_TL_PMC/
Updating base class ->Soldier_Base_PMC, by ca\characters_pmc\config.bin/cfgVehicles/Soldier_Bodyguard_M4_PMC/
Updating base class ->Soldier_Base_PMC, by ca\characters_pmc\config.bin/cfgVehicles/Soldier_Bodyguard_AA12_PMC/
Updating base class ->BAF_Soldier_MTP, by ca\characters_w_baf\config.bin/CfgVehicles/BAF_Soldier_W/
Updating base class ->BAF_Soldier_L_MTP, by ca\characters_w_baf\config.bin/CfgVehicles/BAF_Soldier_L_W/
Updating base class ->BAF_Soldier_Officer_MTP, by ca\characters_w_baf\config.bin/CfgVehicles/BAF_Soldier_Officer_W/
Updating base class ->BAF_Soldier_SniperH_MTP, by ca\characters_w_baf\config.bin/CfgVehicles/BAF_Soldier_SniperH_W/
Updating base class ->M113Ambul_Base, by ca\tracked_e\m113\config.bin/CfgVehicles/M113Ambul_UN_EP1/
Updating base class ->M113_Base, by ca\tracked_e\m113\config.bin/CfgVehicles/M113_UN_EP1/
Updating base class ->M113Ambul_Base, by ca\tracked_e\m113\config.bin/CfgVehicles/M113Ambul_TK_EP1/
Updating base class ->M113_Base, by ca\tracked_e\m113\config.bin/CfgVehicles/M113_TK_EP1/
Updating base class ->Helicopter, by ca\air_d_baf\config.bin/CfgVehicles/BAF_Merlin_HC3_D/
Obsolete class Animations defined in bin\config.bin/RscCompass/
Obsolete class Animations defined in bin\config.bin/RscWatch/

Link to comment
Share on other sites

UPDATE:

Got the turrets to spawn, they are underpowered though so i still want the AI to spawn with RPG's.

If i follow this tutorial

found a missing semicollon so the ai are spawning now but still w/o rpgs

AIkilled.sqf

private ["_unit","_player","_humanity","_banditkills"];
_unit = _this select 0;
_player = _this select 1;
_type = _this select 2;
_unit removeWeapon "RPG7V";
_unit removeMagazine "PG7VL";
_unit removeMagazine "PG7VL";
 
switch (_type) do {
case "ground" : {ai_ground_units = (ai_ground_units -1);};
case "air" : {ai_air_units = (ai_air_units -1);};
case "vehicle" : {ai_vehicle_units = (ai_vehicle_units -1);};
case "static" : {ai_emplacement_units = (ai_emplacement_units -1);};
};
 
_unit setVariable ["killedat", time];
if (isPlayer _player) then {
private ["_banditkills","_humanity"];
_humanity = _player getVariable["humanity",0];
_banditkills = _player getVariable["banditKills",0];
if (ai_humanity_gain) then {
_player setVariable ["humanity",(_humanity + ai_add_humanity),true];
};
if (ai_banditkills_gain) then {
_player setVariable ["banditKills",(_banditkills + 1),true];
};
if (ai_clear_body) then {
{_unit removeMagazine _x;} forEach (magazines _unit);
{_unit removeWeapon _x;} forEach (weapons _unit);
};
if (ai_ahare_info) then {
{if (((position _x) distance (position _unit)) <= ai_share_distance) then {_x reveal [_player, 4.0];}} forEach allUnits;
};
};

SpawnGroup.sqf

private ["_mission","_aipack","_aicskill","_position","_unitnumber","_skill","_gun","_mags","_backpack","_skin","_gear","_aiweapon","_aigear","_aiskin","_skillarray","_unitGroup","_weapon","_magazine","_weaponandmag","_gearmagazines","_geartools","_unit"];
_position = _this select 0;
_unitnumber = _this select 1;
_skill = _this select 2;
_gun = _this select 3;
_mags = _this select 4;
_backpack = _this select 5;
_skin = _this select 6;
_gear = _this select 7;
if (count _this > 8) then {
    _mission = _this select 8;
    _RPG = 1;
} else {
    _mission = False;
    _RPG = -1;
};
 
_aiweapon = [];
_aigear = [];
_aiskin = "";
_aicskill = [];
_aipack = "";
_skillarray = ["aimingAccuracy","aimingShake","aimingSpeed","endurance","spotDistance","spotTime","courage","reloadSpeed","commanding","general"];
_unitGroup = createGroup east;
 
if (!isServer) exitWith {};
 
for "_x" from 1 to _unitnumber do {
switch (_gun) do {
case 0 : {_aiweapon = ai_wep0;};
case 1 : {_aiweapon = ai_wep1;};
case 2 : {_aiweapon = ai_wep2;};
case 3 : {_aiweapon = ai_wep3;};
case 4 : {_aiweapon = ai_wep4;};
case "Random" : {_aiweapon = ai_wep_random call BIS_fnc_selectRandom;};
};
_weaponandmag = _aiweapon call BIS_fnc_selectRandom;
_weapon = _weaponandmag select 0;
_magazine = _weaponandmag select 1;
switch (_gear) do {
case 0 : {_aigear = ai_gear0;};
case 1 : {_aigear = ai_gear1;};
case 2 : {_aigear = ai_gear2;};
case 3 : {_aigear = ai_gear3;};
case 4 : {_aigear = ai_gear4;};
case "Random" : {_aigear = ai_gear_random call BIS_fnc_selectRandom;};
};
_gearmagazines = _aigear select 0;
_geartools = _aigear select 1;
if (_skin == "") then {
_aiskin = ai_skin call BIS_fnc_selectRandom;
} else {
_aiskin = _skin
};
_unit = _unitGroup createUnit [_aiskin, [(_position select 0),(_position select 1),(_position select 2)], [], 10, "PRIVATE"];
[_unit] joinSilent _unitGroup;
if (_backpack == "") then {
_aipack = ai_packs call BIS_fnc_selectRandom;
} else {
_aipack = _backpack
};
_unit enableAI "TARGET";
_unit enableAI "AUTOTARGET";
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit enableAI "FSM";
_unit setCombatMode ai_combatmode;
_unit setBehaviour ai_behaviour;
removeAllWeapons _unit;
removeAllItems _unit;
_unit addweapon _weapon;
for "_i" from 1 to _mags do {_unit addMagazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V";
_unit addmagazine "PG7VL";
_unit addmagazine "PG7VL";
} else {
_unit addBackpack _aipack;    
};
{_unit addMagazine _x} forEach _gearmagazines;
{_unit addweapon _x} forEach _geartools;
if (ai_custom_skills) then {
switch (_skill) do {
case 0 : {_aicskill = ai_custom_array1;};
case 1 : {_aicskill = ai_custom_array2;};
case 2 : {_aicskill= ai_custom_array3;};
case "Random" : {_aicskill = ai_skill_random call BIS_fnc_selectRandom;};
};
{_unit setSkill [(_x select 0),(_x select 1)]} forEach _aicskill;
} else {
{_unit setSkill [_x,_skill]} forEach _skillarray;
};
ai_ground_units = (ai_ground_units + 1);
_unit addEventHandler ["Killed",{[_this select 0, _this select 1, "ground"] call on_kill;}];
if (_mission) then {
_unit setVariable ["missionclean", "ground"];
};
};
_unitGroup selectLeader ((units _unitGroup) select 0);
[_unitGroup, _position, _mission] call group_waypoints;
 
diag_log format ["WAI: Spawned a group of %1 Bandits at %2",_unitnumber,_position];

.rpt

10:50:59 "WAI: Starting Mission Ural"
10:50:59 "WAI: Ural Attack Mission Started At [7225.73,8317.91]"
10:50:59 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:50:59 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:50:59 Error Undefined variable in expression: _rpg
10:50:59 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:50:59 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:50:59 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:50:59 Error Undefined variable in expression: _rpg
10:50:59 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:50:59 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:50:59 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:50:59 Error Undefined variable in expression: _rpg
10:50:59 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:50:59 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:50:59 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:50:59 Error Undefined variable in expression: _rpg
10:50:59 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:50:59 "WAI: Spawned a group of 4 Bandits at [7225.73,8317.91,0]"
10:50:59 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:50:59 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:50:59 Error Undefined variable in expression: _rpg
10:50:59 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:51:00 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error Undefined variable in expression: _rpg
10:51:00 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:51:00 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error Undefined variable in expression: _rpg
10:51:00 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:51:00 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error Undefined variable in expression: _rpg
10:51:00 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:51:00 "WAI: Spawned a group of 4 Bandits at [7225.73,8317.91,0]"
10:51:00 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error Undefined variable in expression: _rpg
10:51:00 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:51:00 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error Undefined variable in expression: _rpg
10:51:00 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:51:00 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error Undefined variable in expression: _rpg
10:51:00 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:51:00 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error position: <_RPG > 0)) then {
_unit addweapon "RPG7V>
10:51:00 Error Undefined variable in expression: _rpg
10:51:00 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 73
10:51:00 "WAI: Spawned a group of 4 Bandits at [7225.73,8317.91,0]"
10:51:00 "WAI: Sapwned in 2 M2StaticMG"

Link to comment
Share on other sites

FIXED
Posted 14 February 2014 - 12:39 AM

umfufu, on 14 Feb 2014 - 01:24 AM, said:snapback.png

ai_mission_sysyem = True;  in AIconfig.sqf
 
Is this a typo or ment to be ?

typo i think, but also used in init.sqf so only a "cosmetical thing"
 
 
gopostal, on 13 Feb 2014 - 06:29 AM, said:snapback.png

Found a small problem with this. I'm getting this error in the logs:
20:18:19 Error in expression <Magazine _magazine;};
if ((_x == 1) && (_RPG > 0)) then {
_unit addweapon "RPG
7V>
20:18:19 Error Undefined variable in expression: _rpg
 
it repeats multiple times too. I'm new to Arma coding but should it be changed to && (_RPG = 1) ?

 
first line in SpawnGroup.sqf looks like

private ["_mission","_aipack","_aicskill","_position","_unitnumber","_skill","_gun","_mags","_backpack","_skin","_gear","_aiweapon","_aigear","_aiskin","_skillarray","_unitGroup","_weapon","_magazine","_weaponandmag","_gearmagazines","_geartools","_unit"];

add to the end

,"_RPG"

Made it a bit more dynamic, AI can have 0 launchers, or 10

_addRPG = floor(random 7);


for "_i" from 1 to _mags do {_unit addMagazine _magazine;};
    if ((_addRPG == 5)) then {
     removeAllItems _unit;
     removeAllWeapons _unit;
removeBackpack _unit;
     _unit addweapon "RPG7V";
     _unit addmagazine "PG7VL";
     _unit selectweapon "RPG7V";
    } else {
     _unit addBackpack _aipack;
};

Units try to change weapon if you are to close to them or to far away (looks a bit strange) but works perfectly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...