Jump to content

Fulcrum Mission System v2.1a


horbin

Recommended Posts

Sigh... testing is going to have to wait. Lost power where my servers are connected. Going to have to wait till I get off work to deal with it. I'll report back once I've had a chance to test.

 

That said, you may want to look into how Face has setup his headless client scripting in A3EAI. His is the same as Option 2 that I posted earlier. It recognizes the reconnect and transfers the missions and AI back to the headless client when it reconnects.

Link to comment
Share on other sites

Mimic,

   Thanks for the idea. I took a look and Face is using a "Local" eventhandler on the HC object on the server.  Great way to handle/detect a loss of the HC.

 

Next week I'm gonna redesign my 'heartmonitor' code to make use of this mechanism. It appears to be a much cleaner way to detect a disconnect.  Learning the new stuff is what makes this fun!

Link to comment
Share on other sites

hey man..

 

its just strange, i checked on M3 Editor again and watched the coordinates from the Vehicles and its match.. its absolute the same. but when the mission goes life and everything spawns the car is not at the right position where it should belong to.. so do you maybe know why? The building parts are all exact in the same position how i build it. only the vehicles doesnt match up.. :(

 

any idea?

 

 

just in case.. i post the building things...

["M3Editor", [0,0], 777, 1,
   // paste your array of buildings/vehicles what should stay until serverrestart
 [
	["B_Truck_01_mover_EPOCH",[14697.4,16707.8,0],133.183,[0,0,1],true]
]

],

["M3Editor", [0,0], 777, 0,

   // paste your array of building objects here
 [
	["Land_TentHangar_V1_F",[14692.4,16710.5,0],312.727,[0,0,1],true],
	["Land_LampShabby_F",[14694.2,16695.4,0],84.0909,[0,0,1],true],
	["Land_LampShabby_F",[14707.4,16710.3,0],179.091,[0,0,1],true],
	["Land_LampShabby_F",[14677.4,16711.2,0],349.091,[0,0,1],true],
	["Land_LampShabby_F",[14690.6,16726.1,0],267.727,[0,0,1],true],
	["Land_Cargo20_military_green_F",[14686.4,16707.5,0],196.364,[0,0,1],true],
	["Land_Cargo20_military_green_F",[14692.2,16702.4,0],196.364,[0,0,1],true],
	["CargoNet_01_barrels_F",[14692.6,16721.2,0],311.818,[0,0,1],true],
	["CargoNet_01_barrels_F",[14691.6,16720.1,0],311.818,[0,0,1],true],
	["CargoNet_01_barrels_F",[14690.6,16719,0],311.818,[0,0,1],true],
	["CargoNet_01_barrels_F",[14691.7,16718,0],311.818,[0,0,1],true],
	["CargoNet_01_barrels_F",[14692.7,16719.1,0],311.818,[0,0,1],true],
	["CargoNet_01_barrels_F",[14693.7,16720.3,0],311.818,[0,0,1],true],
	["Land_PalletTrolley_01_khaki_F",[14693.6,16716.8,0],279.091,[0,0,1],true],
	["Land_CratesWooden_F",[14698,16716.3,0],44.5454,[0,0,1],true],
	["Land_CratesWooden_F",[14699,16713.2,0],350,[0,0,1],true],
	["Land_CratesWooden_F",[14700.6,16714.9,0],225,[0,0,1],true],
	["Flag_Altis_F",[14686.3,16700.5,0],0,[0,0,1],true],
	["MetalBarrel_burning_F",[14695.6,16714.1,0],0,[0,0,1],true],
	["MetalBarrel_burning_F",[14693,16704.3,0],0,[0,0,1],true],
	["Land_WaterTank_F",[14681.3,16709.2,0],220.455,[0,0,1],true],
	["Land_Cargo10_military_green_F",[14689.2,16722.3,0],319.091,[0,0,1],true],
	["Land_FieldToilet_F",[14687.3,16725,0],76.8182,[0,0,1],true],
	["Land_FieldToilet_F",[14687,16726.3,0],76.8182,[0,0,1],true],
	["Land_Pallets_stack_F",[14695.5,16718.4,0],40.4546,[0,0,1],true],
	["Land_WaterCooler_01_new_F",[14683.1,16709.4,0],193.636,[0,0,1],true],
	["Box_Wps_F",[14689.5,16710.4,0],106.818,[0,0,1],true],
	["Box_Wps_F",[14688.5,16710.8,0],122.727,[0,0,1],true],
	["CargoNet_01_box_F",[14685.4,16710.3,0],15.9091,[0,0,1],true],
	["CargoNet_01_box_F",[14687.2,16709.9,0],30.4546,[0,0,1],true],
	["CargoNet_01_box_F",[14689,16709.1,0],15.9091,[0,0,1],true],
	["Box_Wps_F",[14690.5,16708.3,0],106.818,[0,0,1],true],
	["Box_Wps_F",[14690.7,16708.8,0],106.818,[0,0,1],true],
	["Box_Wps_F",[14691.6,16708.5,0],126.818,[0,0,1],true],
	["Box_Wps_F",[14690.9,16709.5,0],108.182,[0,0,1],true]
]

]
Link to comment
Share on other sites

if ( _type isKindOf "Air" or _type isKindOf "LandVehicle" or _type isKindOf "Ship") then {                                 
_bldg = [ _type, _newPos, [], 30, "CAN_COLLIDE"] call FuMS_fnc_HC_Util_HC_CreateVehicle;    
}else
{
_bldg = createVehicle [ _type, _newpos,[], 0,"CAN_COLLIDE"];
};

this is what it looks for at the moment.

Link to comment
Share on other sites

if ( _type isKindOf "Air" or _type isKindOf "LandVehicle" or _type isKindOf "Ship") then {                                 
_bldg = [ _type, _newPos, [], 30, "CAN_COLLIDE"] call FuMS_fnc_HC_Util_HC_CreateVehicle;    
}else
{
_bldg = createVehicle [ _type, _newpos,[], 0,"CAN_COLLIDE"];
};

this is what it looks for at the moment.

 

Needs to be this:

if ( _type isKindOf "Air" or _type isKindOf "LandVehicle" or _type isKindOf "Ship") then {                                 
_bldg = [ _type, _newPos, [], 0, "CAN_COLLIDE"] call FuMS_fnc_HC_Util_HC_CreateVehicle;    
}else
{
_bldg = createVehicle [ _type, _newpos,[], 0,"CAN_COLLIDE"];
};
Link to comment
Share on other sites

 

Needs to be this:

if ( _type isKindOf "Air" or _type isKindOf "LandVehicle" or _type isKindOf "Ship") then {                                 
_bldg = [ _type, _newPos, [], 0, "CAN_COLLIDE"] call FuMS_fnc_HC_Util_HC_CreateVehicle;    
}else
{
_bldg = createVehicle [ _type, _newpos,[], 0,"CAN_COLLIDE"];
};

 

 

tried, dont worked :( vehicle still spawn on a wrong position "but" it spawns always at the same "wrong" position. while in M3 Editor with the same coords it's on the right place. i dont understand this.. if the vehicle would spawn on another place every mission start, that would make more sense then this... im still confused...

 

 

*EDIT*

 

ok. so it looks like the Vehicle spawns always at the center of the mission. no matter if i change the value to 0 or 30 or 1

looks like the command doesnt count for the vehicles maybe?

Link to comment
Share on other sites

Mimic,

    Try making the following changes to \FuMS\Functions\HeartMonitor.sqf  at lines 23-29

[_owner, _hcID] spawn
{
    private ["_prefix","_hcID","_pulse","_status","_owner","_start","_dead"];
    _prefix = "FuMS_HC_isAlive";
    _owner = _this select 0;
   // _hcID = owner _owner;
   _hcID = _this select 1;

I can test this myself when I get back from my trip.  This may fix it...but if not, I'll have to start some more in-depth troubleshooting.

Finally got a chance to test this. Didn't change anything. When the HC times out and disconnects from the server the AI are transferred server side and don't get cleaned up. When the HC reconnects it spawns a duplicate set of missions doubling the AI and missions.

6g7SWpA.png

 

At this point the only "fix" I have found is that when I see the HC losing connection I use DaRT to temp ban the HC for 15 minutes. This causes the HC to be kicked and does initiate the cleanup. The HC reconnects in 15 minutes and all is well. But this requires me to catch the disconnect in progress.

Link to comment
Share on other sites

Im not sure but is it possible that i paste the snipet code in the wrong line?

I copied my spawnbuilding.sqf to check.

 

//SpawnBulding.sqf
// Horbin
// 1/4/2015
//INPUTS: Building data from Mission main, eCenter, themeIndex, _curMission
//OUTPUTS: array of buildings
//XPos = compile preprocessFileLineNumbers "HC\Encounters\Functions\XPos.sqf";
//ValidateBuilding = compile preprocessFileLineNumbers "HC\Encounters\Functions\DataCheck\ValidateBuildings.sqf";
//GetSafeSpawnVehPos = compile preprocessFileLineNumbers "HC\Encounters\Functions\GetSafeSpawnVehPos.sqf";

private ["_type","_offset","_newpos","_rotation","_bldg","_buildings","_buildingData","_eCenter","_themeIndex","_curMission","_vehicles"];
_buildingData = _this select 0;
_eCenter = _this select 1;
_themeIndex = _this select 2;
_curMission = _this select 3;

_buildings = [];
_vehicles = [];

if (!isNil "_buildingData") then
{
    if (count _buildingData > 0) then
    {
        private ["_firstBuilding"];
        // check if 1st building is at [0,0,0]. If so, work offsets!
        _firstBuilding = _buildingData select 0;
        if (TypeName _firstBuilding == "ARRAY") then {_firstBuilding = [_firstBuilding] call BIS_fnc_selectRandom;};
       // if ([_firstBuilding] call FuMS_fnc_HC_Val_Msn_ValidateBuildings) then
        if (true) then
        {
            private ["_fbLoc","_useOffset","_fireEffect","_persist"];
            _fbLoc = _firstBuilding select 1;
            _useOffset = false;          
            if (_fbLoc select 0 == 0 and _fbLoc select 1 == 0 and _fbLoc select 2 ==0) then {_useOffset = true;};    //3d locations, using offsets! 
      //      diag_log format ["##SpawnBuildings: Debug: 1stBuilding: %1  _useOffset:%2",_firstBuilding, _useOffset];
            //foreach _buildingData
            {
               // if ([_x] call FuMS_fnc_HC_Val_Msn_ValidateBuildings) then
                if (true) then
                {
                    _type = _x select 0;
                    _offset = _x select 1;
                    _rotation = _x select 2;
                    _persist = _x select 3;
                    if (TypeName _type == "STRING") then
                    {
                        if (toupper _type == "M3EDITOR") then
                        {
                            diag_log format ["<FuMS:%1> SpawnBuildings: Found M3Editor building list!",FuMS_Version];
                            
                            private ["_xShift","_yShift","_buildingList","_anchorBldg"];
                            _buildingList = _x select 4;
                            if (_offset select 0 == -1) then {_xShift=0; _yShift=0; _useOffset = false;}
                            else
                            {
                                _useOffset = true;
                                _anchorBldg = _buildingList select 0;
                                _xShift = (_anchorBldg select 1) select 0;
                                _yShift = (_anchorBldg select 1) select 1;
                                diag_log format ["<FuMS:%1> SpawnBuildings:Using offsets of %2,%3",FuMS_Version,_xShift,_yShift];
                            };
                            {
                                private ["_filePosX","_filePosY","_filePosZ","_eCenterX","_eCenterY","_newPos","_filePosition","_newPos","_keep"];
                                _newPos = [0,0,0];
                                _type = _x select 0;
                                // create proper position
                                if (_useOffset) then
                                {
                                    _filePosition = _x select 1;
                                    // position as defined in the M3Editor file
                                    _filePosX = _filePosition select 0;
                                    _filePosY = _filePosition select 1;
                                    _filePosZ = _filePosition select 2;
                                    // encounter's center
                                    _eCenterX = _eCenter select 0;
                                    _eCenterY = _eCenter select 1;
                                    
                                    _newPos set [0, _eCenterX + (_filePosX - _xShift)];
                                    _newPos set [1, _eCenterY + (_filePosY - _yShift)];                                                                
                                    _newPos set [2, _filePosZ];
                                    diag_log format ["<FuMS:%1> SpawnBuildings:Placing %2 at %3",FuMS_Version,_type,_newPos];
                                }else { _newPos = _x select 1;};
                                //New Code Start
				if ( _type isKindOf "Air" or _type isKindOf "LandVehicle" or _type isKindOf "Ship") then {                                 
				_bldg = [ _type, _newPos, [], 0, "CAN_COLLIDE"] call FuMS_fnc_HC_Util_HC_CreateVehicle;    
				}else
				{
				_bldg = createVehicle [ _type, _newpos,[], 0,"CAN_COLLIDE"];
				};
                                //New Code End
                                //_bldg = createVehicle [ _type, _newpos,[],0,"CAN_COLLIDE"];
                                if (_x select 4) then
                                {
                                    _bldg setDir (_x select 2);
                                    _bldg setPos (_newPos);
                                }else
                                {
                                    _bldg setPosATL (_newPos);
                                    _bldg setVectorDirAndUp (_x select 3);
                                };                                                       
                                _keep = false;
                                if (_persist==1) then {_keep = true;};
                                _bldg setVariable ["FuMS_PERSIST",_keep,false];                                                   
                                _buildings = _buildings+ [_bldg];                                                        
                            }foreach _buildingList;
                        };
                    }
                    else
                    {
                        //  diag_log format ["<FuMS> SpawnBuildings: _type:%1",_type];
                        if (TypeName _type == "ARRAY") then {_type = _type call BIS_fnc_selectRandom;};
                        //   diag_log format ["<FuMS> SpawnBuildings: _type selected:%1",_type];
                        
                        if (count _x > 4) then
                        {
                            _fireEffect = toupper(_x select 4);
                            // diag_log format ["<FuMS> SpawnBuildings: Fire/Smoke effect found for %1",_x];
                        }else{_fireEffect="NONE";};
                        
                        if (_useOffset) then
                        {
                            private ["_newx","_newy","_newz"];
                            if (count _eCenter == 2) then {_eCenter set [2,0];};
                            _newx = _eCenter select 0;
                            _newx = _newx + (_offset select 0);
                            
                            _newy = _eCenter select 1;
                            _newy = _newy + (_offset select 1);
                            
                            _newz = _eCenter select 2;
                            _newz = _newz + (_offset select 2);
                            _newpos = [_newx, _newy, _newz];
                        }else {_newpos = [ _eCenter, _offset] call FuMS_fnc_HC_MsnCtrl_Util_XPos;};
                        //   _newpos = [_newpos, 0, 100, 1,0, 8,0,[],[[0,0],[0,0]]] call BIS_fnc_findSafePos; // 1m clear, terraingradient 8 pretty hilly
                        //      if ( (_type isKindOf "Air" or _type isKindOf "LandVehicle" or _type isKindOf "Ship") and TypeName (_x select 3) == "ARRAY") then
                        if (TypeName (_x select 3) == "ARRAY") then
                        {
                            private ["_data","_veh","_settings"];    
                            _settings = _x select 3;
                            diag_log format ["<FuMS> SpawnBuildings: Vehicle found: pos:%1,  type:%2",_newpos, _type];
                            _data = [_newpos, "none", _type] call FuMS_fnc_HC_MsnCtrl_Util_GetSafeSpawnVehPos;	                     
                            _veh = [ _type, _data select 0, [], 30 , _data select 1] call FuMS_fnc_HC_Util_HC_CreateVehicle;	                                                
                            diag_log format ["<FuMS> SpawnBuildings: created:%1, _type:%2",_veh,_type];                                                                  
                            _vehicles = _vehicles + [_veh];                            
                            _veh setDir _rotation;                        
                            _veh setFuel (_settings select 0);
                            _veh setVehicleAmmo (_settings select 1);
                            _veh setHitPointDamage ["hitEngine",_settings select 2];
                            _veh setHitPointDamage ["hitFuel", _settings select 3];
                            _veh setHitPointDamage ["HitHull", _settings select 4];    
                            
                            [_veh,_fireEffect] call FuMS_fnc_HC_Util_Effects;
                            
                        }else
                        {
                            private ["_keep","_adjust"];
                            _bldg = createVehicle [ _type, _newpos,[],0,"CAN_COLLIDE"];
                            _bldg setDir _rotation;
                            
                            if (surfaceiswater _newpos and count _newpos ==3) then
                            { 
                                _adjust = _newpos select 2;
                                _adjust = _adjust - 1.5;
                                _newpos set [2,_adjust];
                                _bldg setposASL _newpos;
                            };
                            
                            _keep = false;
                            if (_x select 3 == 1) then {_keep = true;};
                            _bldg setVariable ["FuMS_PERSIST",_keep,false];
                            
                            [_bldg,_fireEffect] call FuMS_fnc_HC_Util_Effects;
                            
                            // store in HC variable.
                            _buildings = _buildings+ [_bldg];
                            //   HC_HAL_NumBuildings = HC_HAL_NumBuildings + 1;
                            // diag_log format ["## SPAWN Buildings: _bldg:%1   _buildings:%2",_bldg, _buildings];                
                        };
                    };
                }else
                {
                    diag_log format ["<FuMS> SpawnBuilding: ERROR in building data format for mission %1/%2", FuMS_ActiveThemes select _themeIndex,  _curMission];
                    diag_log format ["<FuMS> SpawnBuilding: Offending building/vehicle : %1", _x];
                    _buildingData=_buildingData-[_x];
                };
            } foreach _buildingData;
            //diag_log format ["## SPAWN Buildings: %1",_buildings];
            if (count _buildings > 0) then
            {
                ["Buildings",_buildings] call FuMS_fnc_HC_Util_HC_AddObject;             
            };
            if (count _vehicles > 0 ) then
            {
                ["Vehicles",_vehicles] call FuMS_fnc_HC_Util_HC_AddObject;            
            };
        };
    };
};
[ _buildings, _vehicles]
Link to comment
Share on other sites

ok and the next problem... :(
when i use the sound feature for each mission in the script the server says.

 

"File mpmissions\epoch.Altis\description.ext, line 92: /CfgSounds.sounds: Member already defined."

 

i guess the problem is the already in use content of Zombie Sounds... but how can i fix that?

 

thats my description.ext snippet

class CfgSounds
{
#include "HC\Missions\missionsounds.hpp"
#include "HC\Zombies\infectedsounds.hpp"
};

any idea ?

*solved it*!

class CfgSounds
{
sounds[] = {};
	class intro
	{
		name = "intro";
		sound[] = {"\Sounds\intro.ogg", db-5, 1};
		titles[] = {};
	};	
#include "HC\Zombies\infectedsounds.hpp"
#include "HC\Missions\missionsounds.hpp"
};

deleted the sounds[] = {}; from infectedsounds.hpp and missionsounds.hpp

now it works :)

 

example:

 

missionsounds.hpp

	class test123
	{
		name = "test123";
		sound[] = {"\HC\Missions\sounds\test123.ogg", 1, 1};
		titles[] = {};
	};
	class win2
	{
		name = "win2";
		sound[] = {"\HC\Missions\sounds\win2.ogg", 1, 1};
		titles[] = {};
	};
Link to comment
Share on other sites

 

Im not sure but is it possible that i paste the snipet code in the wrong line?

I copied my spawnbuilding.sqf to check.

 

//SpawnBulding.sqf
// Horbin
// 1/4/2015
//INPUTS: Building data from Mission main, eCenter, themeIndex, _curMission
//OUTPUTS: array of buildings
//XPos = compile preprocessFileLineNumbers "HC\Encounters\Functions\XPos.sqf";
//ValidateBuilding = compile preprocessFileLineNumbers "HC\Encounters\Functions\DataCheck\ValidateBuildings.sqf";
//GetSafeSpawnVehPos = compile preprocessFileLineNumbers "HC\Encounters\Functions\GetSafeSpawnVehPos.sqf";

private ["_type","_offset","_newpos","_rotation","_bldg","_buildings","_buildingData","_eCenter","_themeIndex","_curMission","_vehicles"];
_buildingData = _this select 0;
_eCenter = _this select 1;
_themeIndex = _this select 2;
_curMission = _this select 3;

_buildings = [];
_vehicles = [];

if (!isNil "_buildingData") then
{
    if (count _buildingData > 0) then
    {
        private ["_firstBuilding"];
        // check if 1st building is at [0,0,0]. If so, work offsets!
        _firstBuilding = _buildingData select 0;
        if (TypeName _firstBuilding == "ARRAY") then {_firstBuilding = [_firstBuilding] call BIS_fnc_selectRandom;};
       // if ([_firstBuilding] call FuMS_fnc_HC_Val_Msn_ValidateBuildings) then
        if (true) then
        {
            private ["_fbLoc","_useOffset","_fireEffect","_persist"];
            _fbLoc = _firstBuilding select 1;
            _useOffset = false;          
            if (_fbLoc select 0 == 0 and _fbLoc select 1 == 0 and _fbLoc select 2 ==0) then {_useOffset = true;};    //3d locations, using offsets! 
      //      diag_log format ["##SpawnBuildings: Debug: 1stBuilding: %1  _useOffset:%2",_firstBuilding, _useOffset];
            //foreach _buildingData
            {
               // if ([_x] call FuMS_fnc_HC_Val_Msn_ValidateBuildings) then
                if (true) then
                {
                    _type = _x select 0;
                    _offset = _x select 1;
                    _rotation = _x select 2;
                    _persist = _x select 3;
                    if (TypeName _type == "STRING") then
                    {
                        if (toupper _type == "M3EDITOR") then
                        {
                            diag_log format ["<FuMS:%1> SpawnBuildings: Found M3Editor building list!",FuMS_Version];
                            
                            private ["_xShift","_yShift","_buildingList","_anchorBldg"];
                            _buildingList = _x select 4;
                            if (_offset select 0 == -1) then {_xShift=0; _yShift=0; _useOffset = false;}
                            else
                            {
                                _useOffset = true;
                                _anchorBldg = _buildingList select 0;
                                _xShift = (_anchorBldg select 1) select 0;
                                _yShift = (_anchorBldg select 1) select 1;
                                diag_log format ["<FuMS:%1> SpawnBuildings:Using offsets of %2,%3",FuMS_Version,_xShift,_yShift];
                            };
                            {
                                private ["_filePosX","_filePosY","_filePosZ","_eCenterX","_eCenterY","_newPos","_filePosition","_newPos","_keep"];
                                _newPos = [0,0,0];
                                _type = _x select 0;
                                // create proper position
                                if (_useOffset) then
                                {
                                    _filePosition = _x select 1;
                                    // position as defined in the M3Editor file
                                    _filePosX = _filePosition select 0;
                                    _filePosY = _filePosition select 1;
                                    _filePosZ = _filePosition select 2;
                                    // encounter's center
                                    _eCenterX = _eCenter select 0;
                                    _eCenterY = _eCenter select 1;
                                    
                                    _newPos set [0, _eCenterX + (_filePosX - _xShift)];
                                    _newPos set [1, _eCenterY + (_filePosY - _yShift)];                                                                
                                    _newPos set [2, _filePosZ];
                                    diag_log format ["<FuMS:%1> SpawnBuildings:Placing %2 at %3",FuMS_Version,_type,_newPos];
                                }else { _newPos = _x select 1;};
                                //New Code Start
				if ( _type isKindOf "Air" or _type isKindOf "LandVehicle" or _type isKindOf "Ship") then {                                 
				_bldg = [ _type, _newPos, [], 0, "CAN_COLLIDE"] call FuMS_fnc_HC_Util_HC_CreateVehicle;    
				}else
				{
				_bldg = createVehicle [ _type, _newpos,[], 0,"CAN_COLLIDE"];
				};
                                //New Code End
                                //_bldg = createVehicle [ _type, _newpos,[],0,"CAN_COLLIDE"];
                                if (_x select 4) then
                                {
                                    _bldg setDir (_x select 2);
                                    _bldg setPos (_newPos);
                                }else
                                {
                                    _bldg setPosATL (_newPos);
                                    _bldg setVectorDirAndUp (_x select 3);
                                };                                                       
                                _keep = false;
                                if (_persist==1) then {_keep = true;};
                                _bldg setVariable ["FuMS_PERSIST",_keep,false];                                                   
                                _buildings = _buildings+ [_bldg];                                                        
                            }foreach _buildingList;
                        };
                    }
                    else
                    {
                        //  diag_log format ["<FuMS> SpawnBuildings: _type:%1",_type];
                        if (TypeName _type == "ARRAY") then {_type = _type call BIS_fnc_selectRandom;};
                        //   diag_log format ["<FuMS> SpawnBuildings: _type selected:%1",_type];
                        
                        if (count _x > 4) then
                        {
                            _fireEffect = toupper(_x select 4);
                            // diag_log format ["<FuMS> SpawnBuildings: Fire/Smoke effect found for %1",_x];
                        }else{_fireEffect="NONE";};
                        
                        if (_useOffset) then
                        {
                            private ["_newx","_newy","_newz"];
                            if (count _eCenter == 2) then {_eCenter set [2,0];};
                            _newx = _eCenter select 0;
                            _newx = _newx + (_offset select 0);
                            
                            _newy = _eCenter select 1;
                            _newy = _newy + (_offset select 1);
                            
                            _newz = _eCenter select 2;
                            _newz = _newz + (_offset select 2);
                            _newpos = [_newx, _newy, _newz];
                        }else {_newpos = [ _eCenter, _offset] call FuMS_fnc_HC_MsnCtrl_Util_XPos;};
                        //   _newpos = [_newpos, 0, 100, 1,0, 8,0,[],[[0,0],[0,0]]] call BIS_fnc_findSafePos; // 1m clear, terraingradient 8 pretty hilly
                        //      if ( (_type isKindOf "Air" or _type isKindOf "LandVehicle" or _type isKindOf "Ship") and TypeName (_x select 3) == "ARRAY") then
                        if (TypeName (_x select 3) == "ARRAY") then
                        {
                            private ["_data","_veh","_settings"];    
                            _settings = _x select 3;
                            diag_log format ["<FuMS> SpawnBuildings: Vehicle found: pos:%1,  type:%2",_newpos, _type];
                            _data = [_newpos, "none", _type] call FuMS_fnc_HC_MsnCtrl_Util_GetSafeSpawnVehPos;	                     
                            _veh = [ _type, _data select 0, [], 30 , _data select 1] call FuMS_fnc_HC_Util_HC_CreateVehicle;	                                                
                            diag_log format ["<FuMS> SpawnBuildings: created:%1, _type:%2",_veh,_type];                                                                  
                            _vehicles = _vehicles + [_veh];                            
                            _veh setDir _rotation;                        
                            _veh setFuel (_settings select 0);
                            _veh setVehicleAmmo (_settings select 1);
                            _veh setHitPointDamage ["hitEngine",_settings select 2];
                            _veh setHitPointDamage ["hitFuel", _settings select 3];
                            _veh setHitPointDamage ["HitHull", _settings select 4];    
                            
                            [_veh,_fireEffect] call FuMS_fnc_HC_Util_Effects;
                            
                        }else
                        {
                            private ["_keep","_adjust"];
                            _bldg = createVehicle [ _type, _newpos,[],0,"CAN_COLLIDE"];
                            _bldg setDir _rotation;
                            
                            if (surfaceiswater _newpos and count _newpos ==3) then
                            { 
                                _adjust = _newpos select 2;
                                _adjust = _adjust - 1.5;
                                _newpos set [2,_adjust];
                                _bldg setposASL _newpos;
                            };
                            
                            _keep = false;
                            if (_x select 3 == 1) then {_keep = true;};
                            _bldg setVariable ["FuMS_PERSIST",_keep,false];
                            
                            [_bldg,_fireEffect] call FuMS_fnc_HC_Util_Effects;
                            
                            // store in HC variable.
                            _buildings = _buildings+ [_bldg];
                            //   HC_HAL_NumBuildings = HC_HAL_NumBuildings + 1;
                            // diag_log format ["## SPAWN Buildings: _bldg:%1   _buildings:%2",_bldg, _buildings];                
                        };
                    };
                }else
                {
                    diag_log format ["<FuMS> SpawnBuilding: ERROR in building data format for mission %1/%2", FuMS_ActiveThemes select _themeIndex,  _curMission];
                    diag_log format ["<FuMS> SpawnBuilding: Offending building/vehicle : %1", _x];
                    _buildingData=_buildingData-[_x];
                };
            } foreach _buildingData;
            //diag_log format ["## SPAWN Buildings: %1",_buildings];
            if (count _buildings > 0) then
            {
                ["Buildings",_buildings] call FuMS_fnc_HC_Util_HC_AddObject;             
            };
            if (count _vehicles > 0 ) then
            {
                ["Vehicles",_vehicles] call FuMS_fnc_HC_Util_HC_AddObject;            
            };
        };
    };
};
[ _buildings, _vehicles]

cmoooon plz, nobody knows?

:unsure:

Link to comment
Share on other sites

Really a excellent job you did with this mission!

But I have a few little problems / questions:

I made my own Bandit Camp. When it is finished successfull, the lootbox spawns not exact on the defined place.

The box spawns random about 15 meters around the center point.

When the box spawns, it sometimes bug into my buildings and glitch away.

Is it possible to let the box spawn exact on a defined position?

 

Same with the AI's. They should spawn inside the camp, but they spawn 25m around the center.

 

Is it possible, to let the mission spawn not exact in the center of the marker?

Ok, an offset for the Buildings / AI's will work, but then it will spawn everytime for example 50m North, this is not really unexpected for the players after a few missions.

Link to comment
Share on other sites

I just spoke to Face here on the forums.  He just released a new version of A3EAI that blocks certain Epoch calls to the HC.  As a result it appears as though FuMS cannot connect to the same HC as A3EAI.  For now we are able to run FuMS using a dedicated HC, but this isn't a good long-term solution in my opinion.  I'd much rather be able to run a single HC for both AI packs, as there is plenty of CPU horsepower to go around for each on one HC instance.  When you get a chance would you please look into this?  I'm sure it's probably already on your list of things to do, but I just wanted to bring it to your attention just in case.  

Link to comment
Share on other sites

hey horbin. i tried everything out but i dont get it. when i changed it from 30 to 8 or 10 metres.

 

it doesnt show effect. car is spawning on mission 0 metre in center. i got no clue why :(

 

do u got any solution for it?

still.... a problem :(

Link to comment
Share on other sites

Darth,

 

I am just getting back from my trip, so have some catching up to do.  More improvements to come, and maybe this is just a simple solution.  But out of the gate, I am going to focus on adding functionality, not 'incorporating compatibility'.

 

I am 90% sure this is simply an artifact of something Face is trying to work with his code. So for now, I'll wait for the dust to settle. It's all part of the community playing in this big ass sandbox and trying to get stuff to work :)

Link to comment
Share on other sites

Hey horbin,

 

Hope you had a great trip. Welcome back.

 

Was hoping you could provide some insight into something. I am having a problem with FuMS thinking my HC has disconnected when it really hasn't. This is what I'm seeing in my server RPT.

17:41:42 "<FuMS> HeartMonitor: B Alpha 1-1:1 (HC_HAL) REMOTE: 1st Heart beat missed!!FuMS_HC_isAlive3"
17:41:46 "<FuMS> HeartMonitor:B Alpha 1-1:1 (HC_HAL) REMOTE: 2nd Heart beat missed!!FuMS_HC_isAlive3"
17:41:54 "<FuMS> HeartMonitor: B Alpha 1-1:1 (HC_HAL) REMOTE: 1st Heart beat missed!!FuMS_HC_isAlive3"
17:41:56 Warning Message: Bad vehicle type H_47_EPOCH
17:41:58 "<FuMS> HeartMonitor:B Alpha 1-1:1 (HC_HAL) REMOTE: 2nd Heart beat missed!!FuMS_HC_isAlive3"
17:42:06 "<FuMS> HeartMonitor: B Alpha 1-1:1 (HC_HAL) REMOTE: 1st Heart beat missed!!FuMS_HC_isAlive3"
17:42:10 "<FuMS> HeartMonitor:B Alpha 1-1:1 (HC_HAL) REMOTE: 2nd Heart beat missed!!FuMS_HC_isAlive3"
17:42:18 "<FuMS> HeartMonitor: B Alpha 1-1:1 (HC_HAL) REMOTE: 1st Heart beat missed!!FuMS_HC_isAlive3"
17:42:26 "<FuMS> HeartMonitor: B Alpha 1-1:1 (HC_HAL) REMOTE: 1st Heart beat missed!!FuMS_HC_isAlive3"
17:42:30 "<FuMS> HeartMonitor:B Alpha 1-1:1 (HC_HAL) REMOTE: 2nd Heart beat missed!!FuMS_HC_isAlive3"
17:42:38 "<FuMS> HeartMonitor: B Alpha 1-1:1 (HC_HAL) REMOTE: 1st Heart beat missed!!FuMS_HC_isAlive3"
17:42:42 "<FuMS> HeartMonitor:B Alpha 1-1:1 (HC_HAL) REMOTE: 2nd Heart beat missed!!FuMS_HC_isAlive3"
17:42:44 Warning Message: Bad vehicle type H_61_EPOCH
17:42:44 Cannot create non-ai vehicle ItemSodaPurple,
17:42:46 "<infiSTAR.de FNC_AH1250_KICKLOGSPAWN> ["bt60vhic73yh17jlim",["Zazriel","76561197980026825","LVC",B Alpha 1-2:2 (Zazriel) REMOTE,"C_Offroad_01_EPOCH",[15089.3,218.872,0.875515]]]"
17:42:46 "<FuMS> HeartMonitor:B Alpha 1-1:1 (HC_HAL) REMOTE: Disconnect detected. Cleaning up the Mess!!!!FuMS_HC_isAlive3"
17:42:46 "##HC_DataCleanup: FuMS_HCIDs:[0,3]"
17:42:46 "##HC_DataCleanup: FuMS_HCNames:["SERVER","HC_HAL"]"
17:42:46 "##HC_DataCleanup: _varName :FuMS_HC_HAL_AIGroups3"
17:42:46 "HC:CLEANUP Groups: 24 deleted from "
17:42:46 "HC:CLEANUP: R Bravo 1-3:1 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 1-3:1 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 1-3:2 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 1-3:2 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 1-3:6 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 1-3:6 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 2-2:1 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 2-2:1 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 2-2:2 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 2-2:2 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 2-2:6 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 2-2:6 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 3-1:1 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 3-1:1 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 3-1:2 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 3-1:2 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 3-1:6 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 3-1:6 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 3-3:1 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 3-3:1 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 3-3:2 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 3-3:2 REMOTE deleted"
17:42:46 "HC:CLEANUP: R Bravo 3-3:6 REMOTE being checked."
17:42:46 "HC:CLEANUP: R Bravo 3-3:6 REMOTE deleted"
17:42:46 "HC:CLEANUP: 12 vehicles checked for FuMS_HC_HAL_Vehicles3"
17:42:46 "HC:CLEANUP Markers: 10 deleted from FuMS_HC_HAL_Markers3"
17:42:46 "HC:CLEANUP Buildings: 1 deleted from FuMS_HC_HAL_Buildings3"
17:42:46 "HCCLEANUP Triggers: 7 deleted from FuMS_HC_HAL_Triggers3"
17:42:46 "<FuMS> HeartMonitor: HC:B Alpha 1-1:1 (HC_HAL) REMOTE: Complete in 0 secs!FuMS_HC_isAlive3"
17:42:46 "<FuMS> HeartMonitor: Has ended for B Alpha 1-1:1 (HC_HAL) REMOTE:FuMS_HC_isAlive3"

There is nothing out of the ordinary in the HC RPT file at the exact same time. The HC stays connected even after the missions are all cleaned up. If I restart the HC the missions re-appear again. If I just leave it they don't.

 

Any idea what's going on?

Link to comment
Share on other sites

tried, dont worked :( vehicle still spawn on a wrong position "but" it spawns always at the same "wrong" position. while in M3 Editor with the same coords it's on the right place. i dont understand this.. if the vehicle would spawn on another place every mission start, that would make more sense then this... im still confused...

 

 

*EDIT*

 

ok. so it looks like the Vehicle spawns always at the center of the mission. no matter if i change the value to 0 or 30 or 1

looks like the command doesnt count for the vehicles maybe?

 

 

 

Im not sure but is it possible that i paste the snipet code in the wrong line?

I copied my spawnbuilding.sqf to check.

 

//SpawnBulding.sqf
// Horbin
// 1/4/2015
//INPUTS: Building data from Mission main, eCenter, themeIndex, _curMission
//OUTPUTS: array of buildings
//XPos = compile preprocessFileLineNumbers "HC\Encounters\Functions\XPos.sqf";
//ValidateBuilding = compile preprocessFileLineNumbers "HC\Encounters\Functions\DataCheck\ValidateBuildings.sqf";
//GetSafeSpawnVehPos = compile preprocessFileLineNumbers "HC\Encounters\Functions\GetSafeSpawnVehPos.sqf";

private ["_type","_offset","_newpos","_rotation","_bldg","_buildings","_buildingData","_eCenter","_themeIndex","_curMission","_vehicles"];
_buildingData = _this select 0;
_eCenter = _this select 1;
_themeIndex = _this select 2;
_curMission = _this select 3;

_buildings = [];
_vehicles = [];

if (!isNil "_buildingData") then
{
    if (count _buildingData > 0) then
    {
        private ["_firstBuilding"];
        // check if 1st building is at [0,0,0]. If so, work offsets!
        _firstBuilding = _buildingData select 0;
        if (TypeName _firstBuilding == "ARRAY") then {_firstBuilding = [_firstBuilding] call BIS_fnc_selectRandom;};
       // if ([_firstBuilding] call FuMS_fnc_HC_Val_Msn_ValidateBuildings) then
        if (true) then
        {
            private ["_fbLoc","_useOffset","_fireEffect","_persist"];
            _fbLoc = _firstBuilding select 1;
            _useOffset = false;          
            if (_fbLoc select 0 == 0 and _fbLoc select 1 == 0 and _fbLoc select 2 ==0) then {_useOffset = true;};    //3d locations, using offsets! 
      //      diag_log format ["##SpawnBuildings: Debug: 1stBuilding: %1  _useOffset:%2",_firstBuilding, _useOffset];
            //foreach _buildingData
            {
               // if ([_x] call FuMS_fnc_HC_Val_Msn_ValidateBuildings) then
                if (true) then
                {
                    _type = _x select 0;
                    _offset = _x select 1;
                    _rotation = _x select 2;
                    _persist = _x select 3;
                    if (TypeName _type == "STRING") then
                    {
                        if (toupper _type == "M3EDITOR") then
                        {
                            diag_log format ["<FuMS:%1> SpawnBuildings: Found M3Editor building list!",FuMS_Version];
                            
                            private ["_xShift","_yShift","_buildingList","_anchorBldg"];
                            _buildingList = _x select 4;
                            if (_offset select 0 == -1) then {_xShift=0; _yShift=0; _useOffset = false;}
                            else
                            {
                                _useOffset = true;
                                _anchorBldg = _buildingList select 0;
                                _xShift = (_anchorBldg select 1) select 0;
                                _yShift = (_anchorBldg select 1) select 1;
                                diag_log format ["<FuMS:%1> SpawnBuildings:Using offsets of %2,%3",FuMS_Version,_xShift,_yShift];
                            };
                            {
                                private ["_filePosX","_filePosY","_filePosZ","_eCenterX","_eCenterY","_newPos","_filePosition","_newPos","_keep"];
                                _newPos = [0,0,0];
                                _type = _x select 0;
                                // create proper position
                                if (_useOffset) then
                                {
                                    _filePosition = _x select 1;
                                    // position as defined in the M3Editor file
                                    _filePosX = _filePosition select 0;
                                    _filePosY = _filePosition select 1;
                                    _filePosZ = _filePosition select 2;
                                    // encounter's center
                                    _eCenterX = _eCenter select 0;
                                    _eCenterY = _eCenter select 1;
                                    
                                    _newPos set [0, _eCenterX + (_filePosX - _xShift)];
                                    _newPos set [1, _eCenterY + (_filePosY - _yShift)];                                                                
                                    _newPos set [2, _filePosZ];
                                    diag_log format ["<FuMS:%1> SpawnBuildings:Placing %2 at %3",FuMS_Version,_type,_newPos];
                                }else { _newPos = _x select 1;};
                                //New Code Start
				if ( _type isKindOf "Air" or _type isKindOf "LandVehicle" or _type isKindOf "Ship") then {                                 
				_bldg = [ _type, _newPos, [], 0, "CAN_COLLIDE"] call FuMS_fnc_HC_Util_HC_CreateVehicle;    
				}else
				{
				_bldg = createVehicle [ _type, _newpos,[], 0,"CAN_COLLIDE"];
				};
                                //New Code End
                                //_bldg = createVehicle [ _type, _newpos,[],0,"CAN_COLLIDE"];
                                if (_x select 4) then
                                {
                                    _bldg setDir (_x select 2);
                                    _bldg setPos (_newPos);
                                }else
                                {
                                    _bldg setPosATL (_newPos);
                                    _bldg setVectorDirAndUp (_x select 3);
                                };                                                       
                                _keep = false;
                                if (_persist==1) then {_keep = true;};
                                _bldg setVariable ["FuMS_PERSIST",_keep,false];                                                   
                                _buildings = _buildings+ [_bldg];                                                        
                            }foreach _buildingList;
                        };
                    }
                    else
                    {
                        //  diag_log format ["<FuMS> SpawnBuildings: _type:%1",_type];
                        if (TypeName _type == "ARRAY") then {_type = _type call BIS_fnc_selectRandom;};
                        //   diag_log format ["<FuMS> SpawnBuildings: _type selected:%1",_type];
                        
                        if (count _x > 4) then
                        {
                            _fireEffect = toupper(_x select 4);
                            // diag_log format ["<FuMS> SpawnBuildings: Fire/Smoke effect found for %1",_x];
                        }else{_fireEffect="NONE";};
                        
                        if (_useOffset) then
                        {
                            private ["_newx","_newy","_newz"];
                            if (count _eCenter == 2) then {_eCenter set [2,0];};
                            _newx = _eCenter select 0;
                            _newx = _newx + (_offset select 0);
                            
                            _newy = _eCenter select 1;
                            _newy = _newy + (_offset select 1);
                            
                            _newz = _eCenter select 2;
                            _newz = _newz + (_offset select 2);
                            _newpos = [_newx, _newy, _newz];
                        }else {_newpos = [ _eCenter, _offset] call FuMS_fnc_HC_MsnCtrl_Util_XPos;};
                        //   _newpos = [_newpos, 0, 100, 1,0, 8,0,[],[[0,0],[0,0]]] call BIS_fnc_findSafePos; // 1m clear, terraingradient 8 pretty hilly
                        //      if ( (_type isKindOf "Air" or _type isKindOf "LandVehicle" or _type isKindOf "Ship") and TypeName (_x select 3) == "ARRAY") then
                        if (TypeName (_x select 3) == "ARRAY") then
                        {
                            private ["_data","_veh","_settings"];    
                            _settings = _x select 3;
                            diag_log format ["<FuMS> SpawnBuildings: Vehicle found: pos:%1,  type:%2",_newpos, _type];
                            _data = [_newpos, "none", _type] call FuMS_fnc_HC_MsnCtrl_Util_GetSafeSpawnVehPos;	                     
                            _veh = [ _type, _data select 0, [], 30 , _data select 1] call FuMS_fnc_HC_Util_HC_CreateVehicle;	                                                
                            diag_log format ["<FuMS> SpawnBuildings: created:%1, _type:%2",_veh,_type];                                                                  
                            _vehicles = _vehicles + [_veh];                            
                            _veh setDir _rotation;                        
                            _veh setFuel (_settings select 0);
                            _veh setVehicleAmmo (_settings select 1);
                            _veh setHitPointDamage ["hitEngine",_settings select 2];
                            _veh setHitPointDamage ["hitFuel", _settings select 3];
                            _veh setHitPointDamage ["HitHull", _settings select 4];    
                            
                            [_veh,_fireEffect] call FuMS_fnc_HC_Util_Effects;
                            
                        }else
                        {
                            private ["_keep","_adjust"];
                            _bldg = createVehicle [ _type, _newpos,[],0,"CAN_COLLIDE"];
                            _bldg setDir _rotation;
                            
                            if (surfaceiswater _newpos and count _newpos ==3) then
                            { 
                                _adjust = _newpos select 2;
                                _adjust = _adjust - 1.5;
                                _newpos set [2,_adjust];
                                _bldg setposASL _newpos;
                            };
                            
                            _keep = false;
                            if (_x select 3 == 1) then {_keep = true;};
                            _bldg setVariable ["FuMS_PERSIST",_keep,false];
                            
                            [_bldg,_fireEffect] call FuMS_fnc_HC_Util_Effects;
                            
                            // store in HC variable.
                            _buildings = _buildings+ [_bldg];
                            //   HC_HAL_NumBuildings = HC_HAL_NumBuildings + 1;
                            // diag_log format ["## SPAWN Buildings: _bldg:%1   _buildings:%2",_bldg, _buildings];                
                        };
                    };
                }else
                {
                    diag_log format ["<FuMS> SpawnBuilding: ERROR in building data format for mission %1/%2", FuMS_ActiveThemes select _themeIndex,  _curMission];
                    diag_log format ["<FuMS> SpawnBuilding: Offending building/vehicle : %1", _x];
                    _buildingData=_buildingData-[_x];
                };
            } foreach _buildingData;
            //diag_log format ["## SPAWN Buildings: %1",_buildings];
            if (count _buildings > 0) then
            {
                ["Buildings",_buildings] call FuMS_fnc_HC_Util_HC_AddObject;             
            };
            if (count _vehicles > 0 ) then
            {
                ["Vehicles",_vehicles] call FuMS_fnc_HC_Util_HC_AddObject;            
            };
        };
    };
};
[ _buildings, _vehicles]

Hey Horbin, im glad u are back in town. maybe u could find out in few minutes, what i couldnt figured out in 2 weeks?

I believe on your skills! ;-)

Link to comment
Share on other sites

kyrane,

   Please stop spamming the thread. What I gave you was a 'temp fix' to carry you over until I come out with the next update. If it is not working for you, wait for the next update.  I saw your list of buildings and the vehicle from earlier and that will be the data I'll be using to test the code, so when it comes out, it should be working correctly.

Link to comment
Share on other sites

Mimic,

   Just running some testing on my server concerning the HC disconnect.

 

Admin Kick HC = Works OK.

Manually close HC client = Works OK.

Pulling network cable on HC = does NOT work.

   I believe an HC crash behaves similar to 'pulling the network cable', where the HC simply fades away.

 

I have found that when the HC does this 'fade' , that even the "Local" PVEH I have set up is ignored.  It appears that when Arma3 finally disconnects the HC it must destroy/delete the object before ownership of the 'HC' transfers to the server.

 

I am not sure why the 'Heartmonitor' process I have in place is not catching all this, but I'm working it.  Hoping to have this resolved tonight, then be back on course for more of the functionality updates!

 

 

 

 

 

 

 

Works OK = AI transferred to server, then server, within 2 mins deletes all AI, markers, buildings, triggers, and non-player controlled vehicles.

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
×
×
  • Create New...