Jump to content

DangerRuss

Member
  • Posts

    963
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by DangerRuss

  1. You need a gunner with you in an apache to lock on. The pilot or the gunner can lock on for the gunner but only if you have a gunner. Only some of the jets allow the pilot to lock on and fire without a gunner.

  2. Is this constant or could it be lag related? It might be a lot of work but I personally would get all of the trader stuff out of my database and use the cfgServerTrader.hpp

     

    If it isn't just lag related, perhaps you used the same number twice for the toolbelt items and assault rifles? Your pictures dont help because they show different things. The image of the guns under toolbelt items shows assault rifles and not the m110

  3. I have this working however this error is spamming the hell out of my RPT.

    21:23:03 [DZMS]: Running Minor Mission SM5.
    21:23:05 Error in expression <[(_x select 0),(_x select 1)]
    } forEach _aicskill;
    
    
    
    _unit addEventHandler ["Ki>
    21:23:05   Error position: <_aicskill;
    
    
    
    _unit addEventHandler ["Ki>
    21:23:05   Error Undefined variable in expression: _aicskill
    21:23:05 File z\addons\dayz_server\DZMS\Scripts\DZMSAISpawn.sqf, line 136
    21:23:05 Error in expression <[(_x select 0),(_x select 1)]
    } forEach _aicskill;
    

     

    I have also changed the missions so they will display as hints and not text but those edits are in the actual missions.

     

    Here is my edited DZMSAISpawn.sqf

    /*																		//
    	DZMSAISpawn.sqf by Vampire
    	Usage: [position,unitcount,skillLevel] execVM "dir\DZMSAISpawn.sqf";
    		Position is the coordinates to spawn at [X,Y,Z]
    		UnitCount is the number of units to spawn
    		SkillLevel is the skill number defined in DZMSAIConfig.sqf
    */																		//
    private [
    	"_position", "_unitcount", "_skill", "_wpRadius", "_xpos",
    	"_ypos", "_unitGroup", "_aiskin", "_unit", "_weapon",
    	"_magazine", "_wppos1",	"_wppos2", "_wppos3", "_wppos4",
    	"_wp1",	"_wp2",	"_wp3",	"_wp4",	"_wpfin", "_unitArrayName",
    	"_unitMissionCount", "_giveAT",	"_giveAA", "_configured"
    ];
    
    _position = _this select 0;
    _unitcount = _this select 1;
    _skill = _this select 2;
    _unitArrayName = _this select 3;
    _giveAT = if (count _this > 4) then {_this select 4} else {false};
    _giveAA = if (count _this > 5) then {_this select 5} else {false};
    
    //diag_log text format ["[DZMS]: AI Pos:%1 / AI UnitNum: %2 / AI SkillLev:%3",_position,_unitcount,_skill];
    
    _wpRadius = 20;
    
    _xpos = _position select 0;
    _ypos = _position select 1;
    
    //Create the unit group. We use east by default.
    _unitGroup = createGroup east;
    
    //Probably unnecessary, but prevents client AI stacking
    if (!isServer) exitWith {};
    
    for "_x" from 1 to _unitcount do {
    
    	//Lets pick a skin from the array
    	_aiskin = DZMSBanditSkins call BIS_fnc_selectRandom;
    
    	//Lets spawn the unit
    	_unit = _unitGroup createUnit [_aiskin, [(_position select 0),(_position select 1),(_position select 2)], [], 10, "PRIVATE"];
    	
    	//Make him join the correct team
    	[_unit] joinSilent _unitGroup;
    	
    	//Add the behaviour
    	_unit enableAI "TARGET";
    	_unit enableAI "AUTOTARGET";
    	_unit enableAI "MOVE";
    	_unit enableAI "ANIM";
    	_unit enableAI "FSM";
    	_unit setCombatMode "YELLOW";
    	_unit setBehaviour "COMBAT";
    	
    	//Remove the items he spawns with by default
    	removeAllWeapons _unit;
    	removeAllItems _unit;
    	_configured = false;
    	
    
    	// Give AA if applicable
    	if (DZMSUseAA && _giveAA && _x == 1) then {
    		_unit addMagazine DZMS_AA_Magazine;
    		_unit addMagazine DZMS_AA_Magazine;
    
    		_unit addWeapon DZMS_AA_Weapon;
    		_unit selectWeapon DZMS_AA_Weapon;
    
    		_aicskill = DZMSSkillsAA;
    		_configured = true;
    	};
    
        // Give AT if applicable
    	if (DZMSUseAT && _giveAT && _x == _unitcount) then {
    		_unit addMagazine DZMS_AT_Magazine;
    		_unit addMagazine DZMS_AT_Magazine;
    
    		_unit addWeapon DZMS_AT_Weapon;
    		_unit selectWeapon DZMS_AT_Weapon;
    
    		_aicskill = DZMSSkillsAT;
    		_configured = true;
    	};
    
    	//Now we need to figure out their loadout, if not already equiped
    	if(!_configured) then {
    		//Get the weapon array based on skill
    		_weaponArray = [_skill] call DZMSGetWeapon;
    		
    		_weapon = _weaponArray select 0;
    		_magazine = _weaponArray select 1;
    		
    		//diag_log text format ["[DZMS]: AI Weapon:%1 / AI Magazine:%2",_weapon,_magazine];
    		
    		//Get the gear array
    		_aigearArray = [DZMSGear0,DZMSGear1,DZMSGear2,DZMSGear3,DZMSGear4];
    		_aigear = _aigearArray call BIS_fnc_selectRandom;
    		_gearmagazines = _aigear select 0;
    		_geartools = _aigear select 1;
    		
    		//Gear the AI backpack
    		_aipack = DZMSPacklist call BIS_fnc_selectRandom;
    
    		//Lets add it to the Unit
    		for "_i" from 1 to 3 do {
    			_unit addMagazine _magazine;
    		};
    		_unit addWeapon _weapon;
    		_unit selectWeapon _weapon;
    		
    		_unit addBackpack _aipack;
    		
    		if (DZMSUseNVG) then {
    			_unit addWeapon "NVGoggles";
    		};
    		
    		{
    			_unit addMagazine _x
    		} forEach _gearmagazines;
    		
    		{
    			_unit addWeapon _x
    		} forEach _geartools;
    
    		//Lets set the skills
    		switch (_skill) do {
    			case 0: {_aicskill = DZMSSkills1;};
    			case 1: {_aicskill = DZMSSkills2;};
    			case 2: {_aicskill = DZMSSkills3;};
    		};
        };
    	
    	{
    		_unit setSkill [(_x select 0),(_x select 1)]
    	} forEach _aicskill;
    
    	
    	//Lets prepare the unit for cleanup
    	_unit addEventHandler ["Killed",{ [(_this select 0), (_this select 1)] ExecVM DZMSAIKilled; }];
    	_unit setVariable ["DZMSAI", true];
    };
    
    // These are 4 waypoints in a NorthSEW around the center
    _wppos1 = [_xpos, _ypos+20, 0];
    _wppos2 = [_xpos+20, _ypos, 0];
    _wppos3 = [_xpos, _ypos-20, 0];
    _wppos4 = [_xpos-20, _ypos, 0];
    
    // We add the 4 waypoints
    _wp1 = _unitGroup addWaypoint [_wppos1, _wpRadius];
    _wp1 setWaypointType "MOVE";
    _wp2 = _unitGroup addWaypoint [_wppos2, _wpRadius];
    _wp2 setWaypointType "MOVE";
    _wp3 = _unitGroup addWaypoint [_wppos3, _wpRadius];
    _wp3 setWaypointType "MOVE";
    _wp4 = _unitGroup addWaypoint [_wppos4, _wpRadius];
    _wp4 setWaypointType "MOVE";
    
    // Then we add a center waypoint that tells them to visit the rest
    _wpfin = _unitGroup addWaypoint [[_xpos,_ypos, 0], _wpRadius];
    _wpfin setWaypointType "CYCLE";
    
    //diag_log text format ["[DZMS]: Spawned %1 AI at %2",_unitcount,_position];
    
    // load the unit groups into a passed array name so they can be cleaned up later
    call compile format["
    %1 = %1 + (units _unitGroup); 
    _unitMissionCount = count %1;
    ",_unitArrayName];
    diag_log text format["[DZMS]: (%3) %1 AI Spawned, %2 units in mission.",count (units _unitGroup),_unitMissionCount,_unitArrayName];
    

  4. Could I somehow use this to enable building in trade cities? By Changing "canbuild = true;" to "canbuild = false;" or "if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };" to "if(!canbuild) then { _cancel = false; _reason = "Cannot build in a city."; };"

     

    ?

    You could probably just remove the trader cities from the sensors in the mission.sqm. Most safe zones scripts allow you to manually set the safe zone coordinates, so you dont need to have them in the sensors as well.

  5. Waking through walls sure. But I'm talking about full sprinting through the wall without slowing down or anything. I tested it by surrounding myself with 4 regular cinder walls then spawned a bunch of zombies and started shooting, no zombies got to me. Then I surrounded myself in 4 cinder walls that were rotated 90 degrees and did the same thing and immediately I was covered in zombies. They run through the walls like they're not even there.

    Doesn't happen for me, I checked. They won't even come in if I open the doors for them

    9OEtsaf.jpg

  6.  

    @DangerRuss

    Why are you calling the mission.biedi file? This is just for the Arma Editor =)

    Never name a file "mission" - it just creates problems and confusion!

     

    Anyway -  The measurement from the West and South are different in the Biedi compaired to the SQF.

    It should look like this once finished =)

    _vehicle_32 = objNull;
    if (true) then
    {
      _this = createVehicle ["Land_Wall_L1_gate_EP1", [4688.5459, 11985.612, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
      _vehicle_32 = _this;
      _this setDir 37.598709;
      _this setPos [4688.5459, 11985.612, 3.0517578e-005];
      _this setVectorUp [0, 0, 1];
    };

    This is in the editor  :)  I was making something in the editor and trying to set the vectors but any time I added them it produced that error. Your solution is for the SQF which wont help me in the editor.

  7.  

    can you figure out why this spawn out of all the rest crash when you open the gear?

     

     

     

    In the future, if you put your code in a code box and a spoiler, more people will be likely to look at your problem and want to help. When people see a wall of text like that, they dont even bother sometimes.

    
    /* //
    DZMSAISpawn.sqf by Vampire
    Usage: [position,unitcount,skillLevel] execVM "dir\DZMSAISpawn3.sqf";
    Position is the coordinates to spawn at [X,Y,Z]
    UnitCount is the number of units to spawn
    SkillLevel is the skill number defined in DZMSAIConfig.sqf
    */ //
    private ["_position","_unitcount","_skill","_wpRadius","_xpos","_ypos","_unitGroup","_aiskin","_unit","_weapon","_magazine","_wppos1","_wppos2","_wppos3","_wppos4","_wp1","_wp2","_wp3","_wp4","_wpfin","_unitArrayName","_unitMissionCount"];
    _position = _this select 0;
    _unitcount = _this select 1;
    _skill = _this select 2;
    _unitArrayName = _this select 3;
     
    //diag_log text format ["[DZMS]: AI Pos:%1 / AI UnitNum: %2 / AI SkillLev:%3",_position,_unitcount,_skill];
     
    _wpRadius = 20;
     
    _xpos = _position select 0;
    _ypos = _position select 1;
     
    //Create the unit group. We use civilian by default.
    _unitGroup = createGroup civilian;
     
    //Probably unnecessary, but prevents client AI stacking
    if (!isServer) exitWith {};
     
    for "_x" from 1 to _unitcount do {
     
    //Lets pick a skin from the array
    _aiskin = DZMSBanditSkins3 call BIS_fnc_selectRandom;
     
    //Lets spawn the unit
    _unit = _unitGroup createUnit [_aiskin, [(_position select 0),(_position select 1),(_position select 2)], [], 10, "PRIVATE"];
     
    //Make him join the correct team
    [_unit] joinSilent _unitGroup;
     
    //Add the behaviour
    _unit enableAI "TARGET";
    _unit enableAI "AUTOTARGET";
    _unit enableAI "MOVE";
    _unit enableAI "ANIM";
    _unit enableAI "FSM";
    _unit setCombatMode "RED";
    _unit setBehaviour "COMBAT";
     
    //bank
            _cash = round(random 10) * 60; // number between 0 and 20 000
     
                    // Soul Hive
    _unit setVariable["CashMoney",_cash ,true];
     
    //Remove the items he spawns with by default
    removeAllWeapons _unit;
    removeAllItems _unit;
     
     
    //Now we need to figure out their loadout, and assign it
     
    //Get the weapon array based on skill
    _weaponArray = [_skill] call DZMSGetWeapon;
     
    _weapon = _weaponArray select 0;
    _magazine = _weaponArray select 1;
     
    //diag_log text format ["[DZMS]: AI Weapon:%1 / AI Magazine:%2",_weapon,_magazine];
     
    //Get the gear array
    _aigearArray = [DZMSGear0,DZMSGear1,DZMSGear2,DZMSGear3,DZMSGear4];
    _aigear = _aigearArray call BIS_fnc_selectRandom;
    _gearmagazines = _aigear select 0;
    _geartools = _aigear select 1;
     
    //Gear the AI backpack
    _aipack = DZMSPacklist call BIS_fnc_selectRandom;
     
    //Lets add it to the Unit
    for "_i" from 1 to 3 do {
    _unit addMagazine _magazine;
    };
    _unit addWeapon _weapon;
    _unit selectWeapon _weapon;
     
    _unit addBackpack _aipack;
     
    if (DZMSUseNVG) then {
    _unit addWeapon "NVGoggles";
    };
     
    {
    _unit addMagazine _x
    } forEach _gearmagazines;
     
    {
    _unit addWeapon _x
    } forEach _geartools;
     
    _aicskill = DZMSSkills3;
     
    //Lets set the skills
    switch (_skill) do {
    case 0: {_aicskill = DZMSSkills0;};
    case 1: {_aicskill = DZMSSkills1;};
    case 2: {_aicskill = DZMSSkills2;};
    case 3: {_aicskill = DZMSSkills3;};
    case 4: {_aicskill = DZMSSkills4;};
    case 5: {_aicskill = DZMSSkills5;};
    case 6: {_aicskill = DZMSSkills6;};
    case 7: {_aicskill = DZMSSkills7;};
    case 8: {_aicskill = DZMSSkills8;};
    case 9: {_aicskill = DZMSSkills9;};
    case 10: {_aicskill = DZMSSkills10;};
    case 11: {_aicskill = DZMSSkills11;};
    case 12: {_aicskill = DZMSSkills12;};
    case 13: {_aicskill = DZMSSkills13;};
    case 14: {_aicskill = DZMSSkills14;};
    case 20: {_aicskill = DZMSSkills20;};
    case 21: {_aicskill = DZMSSkills21;};
    case 22: {_aicskill = DZMSSkills22;};
    case 23: {_aicskill = DZMSSkills23;};
    case 24: {_aicskill = DZMSSkills24;};
    case 25: {_aicskill = DZMSSkills25;};
    case 26: {_aicskill = DZMSSkills26;};
    case 27: {_aicskill = DZMSSkills27;};
    case 28: {_aicskill = DZMSSkills28;};
    case 29: {_aicskill = DZMSSkills29;};
    case 30: {_aicskill = DZMSSkills30;};
    case 31: {_aicskill = DZMSSkills31;};
    case 32: {_aicskill = DZMSSkills32;};
    case 33: {_aicskill = DZMSSkills33;};
    case 34: {_aicskill = DZMSSkills34;};
    };
     
    {
    _unit setSkill [(_x select 0),(_x select 1)]
    } forEach _aicskill;
     
    //Lets prepare the unit for cleanup
    _unit addEventHandler ["Killed",{ [(_this select 0), (_this select 1)] ExecVM DZMSAIKilled; }];
    _unit setVariable ["DZMSAI", true];
    };
     
    //Lets give a launcher if enabled
    //The last _unit should still be defined from the FOR above
    if (DZMSUseRPG3) then {
    _unit addWeapon "BAF_NLAW_Launcher";
    _unit addMagazine "M_NLAW_AT";
    };
     
    // These are 4 waypoints in a NorthSEW around the center
    _wppos1 = [_xpos, _ypos+20, 0];
    _wppos2 = [_xpos+20, _ypos, 0];
    _wppos3 = [_xpos, _ypos-20, 0];
    _wppos4 = [_xpos-20, _ypos, 0];
     
    // We add the 4 waypoints
    _wp1 = _unitGroup addWaypoint [_wppos1, _wpRadius];
    _wp1 setWaypointType "MOVE";
    _wp2 = _unitGroup addWaypoint [_wppos2, _wpRadius];
    _wp2 setWaypointType "MOVE";
    _wp3 = _unitGroup addWaypoint [_wppos3, _wpRadius];
    _wp3 setWaypointType "MOVE";
    _wp4 = _unitGroup addWaypoint [_wppos4, _wpRadius];
    _wp4 setWaypointType "MOVE";
     
    // Then we add a center waypoint that tells them to visit the rest
    _wpfin = _unitGroup addWaypoint [[_xpos,_ypos, 0], _wpRadius];
    _wpfin setWaypointType "CYCLE";
     
    //diag_log text format ["[DZMS]: Spawned %1 AI at %2",_unitcount,_position];
     
    // load the unit groups into a passed array name so they can be cleaned up later
    call compile format["
    %1 = %1 + (units _unitGroup); 
    _unitMissionCount = count %1;
    ",_unitArrayName];
     
    diag_log text format["[DZMS]: (%3) %1 AI Spawned, %2 units in mission.",count (units _unitGroup),_unitMissionCount,_unitArrayName];
    
    

     

    If the game is crashing when you loot an AI, that means you put an item in their inventory that is either illegal, spelled wrong, wrong classname, you didnt put the right prefix in front of it (Item, Part, etc) You messed up somewhere, start from scratch.

  8. So do everything like he explained in the map editor. Save it. Open the SQF file. Open one of his missions as an example. use the flag pole as your center and literally do the addition and subtraction of the other items relative to the flag pole. 
    Which will look something like this

    _crate = createVehicle ["USVehicleBox",_coords,[], 0, "CAN_COLLIDE"];
    _crate1 = createVehicle ["AmmoBoxSmall_556",[(_coords select 0)   HERE---> - 3.7251,<---HERE   (_coords select 1)   HERE---> - 2.3614,<---HERE  0],[], 0, "CAN_COLLIDE"];
    _crate2 = createVehicle ["AmmoBoxSmall_762",[(_coords select 0) - 3.4346, 0, 0],[], 0, "CAN_COLLIDE"];
    _crate3 = createVehicle ["AmmoBoxSmall_556",[(_coords select 0) + 4.0996,(_coords select 1) + 3.9072, 0],[], 0, "CAN_COLLIDE"];
    
    

    Really you just have to mess around with it. Ive never done it before but it doesn't look like it would be too hard to figure out especially since he's made notations all over DZMS. It's almost a tutorial in and of itself if you have a bit of patience.

  9. There are a few reasons to run stuff server side.

     

    1. Makes it so AI can not see through custom buildings.

    2. Keeps the mission file download for players low.

    3. Stops people from being able to join your server then leave and stealing your code for all your custom buildings, etc.

    4. Stops the annoying "double up" of buildings, making all your custom stuff have "double doors" etc

     

    Just my opinion of course, but if you have spent hours in the editor getting custom stuff built for YOUR server, why let someone else just come along and take it?

    Welllll I mean I do run things server side so Im not trying to argue against it, but I want to clear some things up.

    1. This just isn't entirely true. I've had ai attack and shoot through walls of server side addons.

    2. Definitely although by doing so it is less for the server load.

    3. It doesn't actually stop them, it just makes it harder. People who know what they're doing can get your Server PBO's relatively easy.

    4. True, unless you messed up somewhere.

     

    All and all I like having a smaller mission file for players it's just nicer when they can load in faster so I call them via server_functions.

×
×
  • Create New...