Jump to content

kyrane

Member
  • Posts

    81
  • Joined

  • Last visited

Posts posted by kyrane

  1. Expect 2.0 this weekend...hopefully Friday evening.

     

    Overview:

    -HC connect/disconnect logic greatly improved (HC will retain control of AI through heavy network and server lag)

    - min/max 'players online' settings for all themes

    - Damage Building trigger added - allow missions to change state based upon damage to specific or all buildings.

    - Damage Vehicle trigger added - allow missions to change state based upon damage to specific or all vehicles.

    - M3Editor buildings now support FuMS smoke/fire definitions

    - Missions will be able to execute Admin custom mission start and mission end scripts, defined per mission.

    - many minor bug fixes and tweaks (will be noted in final update notes)

    Wow.... great new features! :)

    What about the Sound feature of Mission Start / Win / Lose, will it be intigrated?

     

  2. 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! ;-)

  3. 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 :(

  4.  

    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:

  5. 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[] = {};
    	};
    
  6. 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]
    
  7.  

    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?

  8. 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.

  9. 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]
    ]
    
    ]
    
  10. so... what i have to do when i wanna made a mission with win condition is to blow up a spawned mission building?

     

    i guess it should looks like this?

    if [MissionBuilding, ["Land_TentHangar_V1_F", 50],["Another Building if u like", 80] ] then WIN Trigger start?

     [    //WIN Triggers and Controls
         // ["LowUnitCount", "GUER", 0, 0, [0,0]], // all enemies are dead:  side options "EAST","WEST","GUER","CIV","LOGIC","ANY"
          ["ProxPlayer", [0,0], 100, 1], // 1 player is within 100 meters of encounter center.
          //["BodyCount", 20],
          ["BuildHealth", 49],
          ["Reinforce", 25, "Random"]
        ],
    

    i know its horrible...

  11. Okay, nice this works.
    and how i setup the Vehicle in the "Building" part not to disappear after mission is finished, so despawn after server period just like the other

    cars on "Vehicle" ? and of course not to sellable.

     

    *EDIT*

     

    figured out!

     

    i just made two arrays in one brackte with ["M3Editor", [0,0], 777, 0, and so on...

     

    one with zero and one with one... so buildings disappear but vehicles stay until server restart. EPIC! :)

     

    i found some code from you inside the vancrash.sqf

    // Vehicle Name  | offset | rotation | Fuel, Ammo, DmgEngine, Dmg FuelTank, DmgHull
    //    ["I_UGV_01_rcws_F",[0,100],   0,       [.5,   1,     .5,         .5,         .5]],
    //    ["Land_Wreck_Car2_F",[0,50],0, [.5, 1, .5, .5], "Fire"]
    

    have this any function atm? or was this just a trial?

    looks like uve tried to inside damaged vehicles inside the mission.. is this working?

     

    and for last. ive asked you if its possible to change the win conditions. no bodycount but for this.. maybe escape count or destruction count for blow up a building. and will the rest of AI who are alive after the mission is solved also cleaned up?

     

    ah and at least.. your triggers.. ive read alot about it and tried alot but something i dont understand..

     [    //Phase01 Triggers and Controls
          //      ["Detected",0,0]
          //Launch mission if any group or vehicle detects a player
            ],
    

    when i win the first mission, i can activate the Phase01? or have i write it into the "Win" trigger?

    and when i only use 1 trigger (Phase01) what happen when i win this mission also? is there any hint about to won the whole mission match for the players?

     

    bah and at least.. i know i suck with my questions but this i really have to know.. is it possible to let the whole fums working with how much players are still online? its shit that guys can farm the whole nite when only 4-5 opponents are online.. so would be nice the FumS Missions are only starts at least when 15 players are online or 10 etc...

    as always.. have a nice day and thx alot for this great mission script!

  12. and to figure the other point out here are the mission where the vehicle is noticed.

     

    VanCrash.sqf

    // Vehicles
    [
         [  // Convoy #1                     
        [   // ["Vehicleclassname", [Offset?,Offset?],[1 ,"Crew only 1 type!"],"CargoLootName"],
    	["B_Truck_01_mover_F",[0,0],[1 ,""],"None"]
    	//["B_G_Quadbike_01_F",[0,0],[1 ,""],"None"]
          ],
          [  
               // "Convoy": spawn at -500,-500, drop off cargo at -50,-50, then return to base. (ie 'Convoy' logic behaviour)
               // Drivers                                                          # and type  |         Patrol     |    spawn   | dest       | 'Patrol' options
               //[["RESISTANCE","COMBAT","RED","COLUMN"],   [  [3, "Driver"]  ],   ["TrackRoute",[0,0],[0,0],["SAFE","LIMITED",["Villages","Villages"],true,true,false,0]   ]]
               // proceed to 0,-15, drop off troops, then return to spawn location and despawn!
          ],
         [      //  Troop behaviour and side options         # and type of Troops              # Patrol logic | spawn |dest |'Patrol' options
                //[["RESISTANCE","COMBAT","RED","COLUMN"],   [  [3,"Sniper"],[2,"Rifleman"]  ],   ["BoxPatrol",[0,0],[0,0],[100]   ]]
                // [["RESISTANCE","COMBAT","RED","COLUMN"],   [  [1,"Sniper"],[2,"Rifleman"] ],   ["BoxPatrol",[-70,-600],[50,0],[50]   ]],
                // [["RESISTANCE","COMBAT","RED","COLUMN"],   [  [1,"Sniper"],[3,"Rifleman"]  ],   ["BoxPatrol",[-70,-600],[-50,0],[50]   ]]
                // 'dest' for troops is where they will go to perform their 'Patrol Logic'
                // once the disembark the convoy IF their vehicle's driver group is using the 'Convoy' patrol logic.
                // otherwise troops will remain in vehicle unless it is engaged. Once vehicle destroyed,
                // Troops will move onto their 'Patrol Logic'.
         ]
       ]  
    ],
    

    here we go.

  13. temp solution to M3Editor based vehicles. This should keep them from going 'poof'.

     

    \FuMS\HC\MsnCtrl\Spawn\SpawnBuildings.sqf

     

    at line 81 replace _bldg = createVehicle [ _type, _newpos,[],0,"CAN_COLLIDE"];

     

    with:

    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"];
    };

     

    If you find that the vehicles are appearing too far out of position reduce the '30' to a smaller value. I left it at 30 to give Arma3 some room to try and find a reasonable place to spawn the vehicle to hopefully keep it out of trees and other terrain objects when your bases are spawned in locations different from where they where designed.

    i mean that post before. i placed it like above and changed the 30 to 8 and then to 15 but it doesnt matter, vehicles always spawn totally random between 30 and 75 metres..

  14. i tried with your costumized code in spawnbuildings.sqf on line 84

     

    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"];
    };
    

    but it still dont work. the vehicle spawns almost 30-60 metres away from the central of the mission. and there is no thing with what it can collide.

  15. ok finally i get the cars inside. is it possible to made a fixed spawnpoint for the car, just like the buildings?

     

    i build a hangar and want my car inside from the mission, but when the mission spawn the car stand arround 10-20 metres from the central point away. is it possible to fix this, just like the rest of the building parts from M3 Editor?

     

    Would be nice if its possible to directed the spawn point from the vehicles through the mission.

    ["B_Truck_01_mover_F",[0,0],[1 ,""],"None"]
    

    [-1,-1] or [1,1] take not effect of what i expect.

  16. alot thanks.. i know it's annoyied always asking questions for maybe if u search a while u find itself the answer.

     

    but to be honest... i really like to get feedback from the creator of that script before i waste a week of trial and error.. more error as trial.. i hope u can understand this.

     

    ;)

  17. and how i insert this vehicles with the same spawnpoint as the missions? atm it use the coords i give when i write the vehicle into the sqf.

     

    and is it possible to use a Z coordinate for 50Cal. ? would like to put it on a Roof from a building.. also the AI.

  18. Oh cmon plz, no one can help me how i have to write the vehicles in the FumS SEM missions?

     

    There is no tutorial given for that part. And its the only thing who stopped me from finish my work...

     

    i tried 10 times out of combination.. at least they spawned, but on a fixed position and not by the mission.

     

    Any idea?

×
×
  • Create New...