Jump to content
Sign in to follow this  
mairis1

Respawn loadout script problem

Recommended Posts

Hello, i have problem withs respawn loadout script. When spawn igame first time i have random loadout and all, but when i die and try respawn i get default rifleman loudout. 

 

Il use                         null = [this,3] execVM "fnc_generate_loadout.sqf"; this addeventhandler ["Respawn","[_this,3] execVM 'fnc_generate_loadout.sqf'"]; , , il check google and try many thinkgs for this but nothing works , its one last piece i need to get deathmatch zone up

 

 

And this is my fnc_generate_loadout.sqf

_unit = _this select 0;
_level = _this select 1;
_maxTech = _level * 2;
_capacity = 0;

_cfgVehicles = configfile >> "cfgVehicles";
_cfgWeapons = configfile >> "cfgWeapons";
_cfgMagazines = configFile >> "cfgMagazines";

_sniperRifles = ["srifle_GM6_F","srifle_LRR_F"];
_sniperScopes = ["optic_Nightstalker","optic_tws","optic_tws_mg","optic_SOS"];

if (isnil("fnc_get_techLevel")) then 
{
	fnc_get_techLevel = compile loadfile "fnc_get_techLevel.sqf";
};

if (isNil ("bFinishedInventory")) then
{
	bFinishedInventory = false;
	nul = [] execVM "fnc_seperate_inv.sqf";
};

waitUntil {bFinishedInventory};

_bHat = if ((random 100) <= (30 * _level)) then {true} else {false};
_bBackpack = if ((random 100) <= (15 * _level)) then {true} else {false};
_bVest = if ((random 100) <= (20 * _level)) then {true} else {false};

_primaryMod = if (_level > 1) then {33} else {15};
_bPrimary = if ((random 100) <= (_primaryMod * _level)) then {true} else {false};

_secondaryMod = if (_bPrimary && (_level < 2)) then {20} else {33};
_bSecondary = if ((random 100) <= (_secondaryMod * _level)) then {true} else {false};

_launcherMod = if (_level > 1) then {7.5} else {3};
_bLauncher = if ((random 100) <= (_launcherMod * _level)) then {true} else {false};

_grenadeMod = if (_level > 1) then {30} else {10};
_bGrenade = if ((random 100) <= (_grenadeMod * _level)) then {true} else {false};

_explosiveMod = if (_level > 1) then {5} else {2};
_bExplosive = if ((random 100) <= (_explosiveMod * _level)) then {true} else {false};

_medKitMod = if (_level > 1) then {20} else {5}; // used when adding the gear down below;
_bMedic = if ((random 100) <= 25) then {true} else {false};

if (!(_bPrimary && _bSecondary)) then {_bSecondary = true};

// removing all gear and weapons

removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
_unit unassignItem "NVGoggles";
_unit unassignItem "NVGoggles_INDEP";
_unit unassignItem "NVGoggles_OPFOR";
removeGoggles _unit;

_weaponsToDitch = weapons _unit;

{
	_unit removeWeapon _x;
} foreach _weaponsToDitch;

_ammoToDitch = magazines _unit;

{
	_unit removeMagazine _x;
} foreach _ammoToDitch;


//gear selection;
_uniform = uniforms select (round (random ((count uniforms) - 1)));
//_uniMass = getNumber (_cfgWeapons >> _uniform >> "itemInfo" >> "mass");
_uniClass = getText (_cfgWeapons >> _uniform >> "itemInfo" >> "uniformClass");
_camo = getnumber (configfile >> "cfgVehicles" >> _uniClass >> "camouflage"); if (isNil ("_camo")) then {_camo = 1.2};
if (_level != 3) then 
{
	if (_level == 1) then
	{
		while {(_camo != 1.2) or (_camo == 0)} do 
		{
			_uniform = uniforms select (round (random ((count uniforms) - 1)));
			//_uniMass = getNumber (_cfgWeapons >> _uniform >> "itemInfo" >> "mass");
			_uniClass = getText (_cfgWeapons >> _uniform >> "itemInfo" >> "uniformClass");
			_camo = getnumber (configfile >> "cfgVehicles" >> _uniClass >> "camouflage"); if (isNil ("_camo")) then {_camo = 1.2};
		};
	}
	else
	{
		while {(_camo < 1) or (_camo == 0)} do 
		{
			_uniform = uniforms select (round (random ((count uniforms) - 1)));
			//_uniMass = getNumber (_cfgWeapons >> _uniform >> "itemInfo" >> "mass");
			_uniClass = getText (_cfgWeapons >> _uniform >> "itemInfo" >> "uniformClass");
			_camo = getnumber (configfile >> "cfgVehicles" >> _uniClass >> "camouflage"); if (isNil ("_camo")) then {_camo = 1.2};
		};
	};
}
else
{
	while {(_camo == 1.2) or (_camo == 0)} do 
	{
		_uniform = uniforms select (round (random ((count uniforms) - 1)));
		//_uniMass = getNumber (_cfgWeapons >> _uniform >> "itemInfo" >> "mass");
		_uniClass = getText (_cfgWeapons >> _uniform >> "itemInfo" >> "uniformClass");
		_camo = getnumber (configfile >> "cfgVehicles" >> _uniClass >> "camouflage"); if (isNil ("_camo")) then {_camo = 1.2};
	};
};


_hat = hats select (round (random ((count hats) - 1)));
_hatMass = getNumber (_cfgWeapons >> _hat >> "itemInfo" >> "mass");
_hatClass = getArray (_cfgWeapons >> _hat >> "itemInfo" >> "allowedSlots");
if (_level != 3) then 
{
	while {(count _hatClass) < 3} do 
	{
		_hat = hats select (round (random ((count hats) - 1)));
		_hatMass = getNumber (_cfgWeapons >> _hat >> "itemInfo" >> "mass");
		_hatClass = getArray (_cfgWeapons >> _hat >> "itemInfo" >> "allowedSlots");
	};
};

_vest = vests select (round (random ((count vests) - 1)));
_backpack = backpacks select (round (random ((count backpacks) - 1)));


_unit addUniform _uniform;
_cargoName = getText (_cfgWeapons >> _uniform >> "itemInfo" >> "containerClass");
_cargoSpace = getNumber (_cfgVehicles >> _cargoName >> "maximumLoad");
_capacity = _capacity + _cargoSpace;

if (_bVest) then 
{
	_unit addVest _vest;
	_cargoName = getText (_cfgWeapons >> _vest >> "itemInfo" >> "containerClass");
	_cargoSpace = getNumber (_cfgVehicles >> _cargoName >> "maximumLoad");
	_capacity = _capacity + _cargoSpace;
};

if (_bHat) then 
{
	_unit addHeadGear _hat;
};

if (_bBackpack) then 
{
	_unit addBackpack _backpack;
	_cargoSpace = getNumber (_cfgVehicles >> _backpack >> "maximumLoad");
	_capacity = _capacity + _cargoSpace;
};

_emptyCapacity = _capacity;


// removeing stock ammo from backpacks and other things
_ammoToDitch = magazines _unit;
_itemsToDitch = items _unit;

{
	_unit removeitem _x;
} foreach _itemsToDitch;
{
	_unit removeMagazine _x;
} foreach _ammoToDitch;

// weapon selection;
_primary = "";
_pTechLevel = 10;
while {_pTechLevel > _maxTech} do
{
	_primary = weaponsPrimary select (round (random ((count weaponsPrimary) - 1)));
	_clip = (getArray (_cfgWeapons >>_primary >> "magazines")) select 0;
	_ammo = getText (_cfgMagazines >> _clip >> "ammo");
	_pTechLevel = [_ammo] call fnc_get_techLevel;
};

_secondary = "";
_sTechLevel = 10;
while {_sTechLevel > _maxTech} do
{
	_secondary = weaponsSecondary select (round (random ((count weaponsSecondary) - 1)));
	_clip = (getArray (_cfgWeapons >>_secondary >> "magazines")) select 0;
	_ammo = getText (_cfgMagazines >> _clip >> "ammo");
	_sTechLevel = [_ammo] call fnc_get_techLevel;
};

_launcher = weaponsLaunchers select (round (random ((count weaponsLaunchers) - 1)));

if (_bPrimary) then 
{
	_unit addWeapon _primary;
	_techLeft = _maxTech - _pTechlevel;
	
	_accNum = round (random _techLeft);
	if (_level == 3) then {_accNum = _techLeft};
	if (_accNum <= 0) exitwith {};
	
	_cfgAccSlots = _cfgWeapons >> _primary >> "WeaponSlotsInfo";
	_possibleSlots = ["CowsSlot","MuzzleSlot","PointerSlot"];
	
	_rand = round (random 100);
	_chance = _level * 20;
	if (_chance > _rand) then
	{
		_possibleSlots = ["CowsSlot","PointerSlot"];
	};

	_accSlots = [];
	_accSlotNum = 0;
	
	for "_i" from 0 to ((count _possibleSlots) - 1) do
	{
		_sel = _possibleSlots select _i;
		if (isClass (_cfgAccSlots >> _sel)) then 
		{
			_accSlotNum = _accSlotNum + 1;
			_accSlots set [(count _accSlots),_sel]
		};
	};
	
	if (_accSlotNum <= 0) exitwith {};
	if (_accSlotNum < _accNum) then {_accNum = _accSlotNum};

	for "_i" from 1 to _accNum do
	{
		_bCanAttach = false;
		_slotAccessories = [];
		_cnt = 0;
		while {!(_bCanAttach or _cnt > 20)} do
		{
			_randomSlot = _accSlots select (round (random ((count _accSlots) - 1)));
			_slotAccessories = getArray (_cfgAccSlots >> _randomSlot >> "compatibleItems");
			if (_randomSlot == "CowsSlot") then
			{
				if (_primary in _sniperRifles) then
				{
					_slotAccessories = _sniperScopes;
				};
			};
			_bCanAttach = if ((count _slotAccessories) > 0) then {true} else {false};
			_cnt = _cnt + 1;
		};
		
		if ((count _slotAccessories) > 0) then
		{
			_randomAcc = _slotAccessories select (round (random ((count _slotAccessories) - 1)));
			_unit addPrimaryWeaponItem _randomAcc;
		};
	};
};

if (_bSecondary) then 
{
	_unit addWeapon _secondary;
	_techLeft = _maxTech - _sTechlevel;
	
	_accNum = round (random _techLeft);
	if (_accNum <= 0) exitwith {};
	
	_cfgAccSlots = _cfgWeapons >> _secondary >> "WeaponSlotsInfo";
	_possibleSlots = ["CowsSlot","MuzzleSlot","PointerSlot"];
	
	_rand = round (random 100);
	_chance = _level * 20;
	
	if (_chance > _rand) then
	{
		_possibleSlots = ["CowsSlot","PointerSlot"];
	};
	
	_accSlots = [];
	_accSlotNum = 0;
	
	for "_i" from 0 to ((count _possibleSlots) - 1) do
	{
		_sel = _possibleSlots select _i;
		if (isClass (_cfgAccSlots >> _sel)) then 
		{
			_accSlotNum = _accSlotNum + 1;
			_accSlots set [(count _accSlots),_sel]
		};
	};

	if (_accSlotNum <= 0) exitwith {};
	if (_accSlotNum < _accNum) then {_accNum = _accSlotNum};
	
	for "_i" from 1 to _accNum do
	{
		_bCanAttach = false;
		_slotAccessories = [];
		_cnt = 0;
		while {!(_bCanAttach or _cnt > 20)} do
		{
			_randomSlot = _accSlots select (round (random ((count _accSlots) - 1)));
			_slotAccessories = getArray (_cfgAccSlots >> _randomSlot >> "compatibleItems");
			_bCanAttach = if ((count _slotAccessories) > 0) then {true} else {false};
			_cnt = _cnt + 1;
		};
		
		if ((count _slotAccessories) > 0) then
		{
			_randomAcc = _slotAccessories select (round (random ((count _slotAccessories) - 1)));
			_unit addHandgunItem _randomAcc;
		};
	};
};

//hint (str([_capacity,_emptyCapacity]));

if (_bLauncher) then 
{
	_unit addWeapon _launcher;
};

_weapons = weapons _unit;
_requiredMagazines = [];
_requiredItems = [];

for "_i" from 0 to ((count _weapons) - 1) do
{
	_weapon = (_weapons select _i);
	_sel = _cfgWeapons >> _weapon;
	_mags = getArray (_sel >> "magazines");
	_mag = _mags select (round (random ((count _mags) - 1)));
	_magMass = getNumber (_cfgMagazines >> _mag >> "Mass");
	
	_rNumber = round(((random 1) + 1) * _level);
	
	if (_weapon == _launcher) then
	{
		_rNumber = ceil (_rNumber / 2);
	};
	
	_requiredMagazines set [(count _requiredMagazines),[_mag,_rNumber]];
};

if (_bMedic) then
{
	if ((random 100) < (_level * _medKitMod)) then 
	{
		_requiredItems set [(count _requiredItems),["MediKit",1]];
	};
	
	_medKitNo = (round (random _level)) + 1;
	_requiredItems set [(count _requiredItems),["FirstAidKit",_medKitNo]];  // DESIGN THIS TO COLLECT THE ITEMS AND ASSIGN THEM SPREAD OUT, PERHPAS CALCULATE MASS REQUIREMENTS FIRST AND CUT BACK BASED ON THAT;

}
else
{
	if (_level == 3) then
	{
		_requiredItems set [(count _requiredItems),["FirstAidKit",1]];
	};
};

if (_bExplosive) then
{
	if ((random 100) > 50) then
	{
		_requiredItems set [(count _requiredItems),["ToolKit",1]];
	};
	
	_explosiveNo = ((ceil (_level / 2)) + (round(random _level)));

	_requiredMagazines set [(count _requiredMagazines),["Explosive",_explosiveNo]];

};

if (_bGrenade) then
{
	_grenadeNo = ((ceil (_level / 2)) + (round(random _level)));

	_requiredMagazines set [(count _requiredMagazines),["Grenade",_grenadeNo]];
};

_explosive = weaponsExplosives select (round (random ((count weaponsExplosives) - 1)));
_grenade = weaponsGrenade select (round (random ((count weaponsGrenade) - 1)));
/*
player globalChat (str(_requiredMagazines));
player globalChat (str(_requiredItems));
*/
while {((count _requiredMagazines) + (count _requiredItems)) > 0} do
{
	_magsOrItems = round (random 1);
	
	if (_magsOrItems == 1) then
	{
		_magsNumber = (count (magazines _unit));
		_weaponsNumber = 0; if ((primaryWeapon _unit) != "") then {_weaponsNumber = _weaponsNumber + 1}; if ((handgunWeapon _unit) != "") then {_weaponsNumber = _weaponsNumber + 1};
		if (((count _requiredMagazines) > 0) && (_weaponsNumber > 0)) then
		{
			_rNumber = round (random ((count _requiredMagazines) - 1));
			if (_magsNumber < _weaponsNumber)then {_rNumber = _magsNumber};
			player globalChat (str(_requiredMagazines));
			player globalChat (str(_weaponsNumber));
			_array = _requiredMagazines select _rNumber;
			_name = _array select 0;
			_number = _array select 1;
			
			if (_number > 0) then
			{		
				if ((_name == "Explosive") or (_name == "Grenade")) then
				{
					if (_name == "Explosive") then
					{
						_name = weaponsExplosives select (round (random ((count weaponsExplosives) - 1)));
					}
					else
					{
						_name = weaponsGrenade select (round (random ((count weaponsGrenade) - 1)));
					};
				};
				
				_magMass = getNumber (_cfgMagazines >> _name >> "Mass");
				
				_array set [1,(_number - 1)];
				_requiredMagazines set [_rNumber,_array];
				
				if (_capacity < _magMass) exitWith {};
				_unit addMagazine _name;
				_capacity = _capacity - _magMass;
			}
			else
			{
				_requiredMagazines set [_rNumber,0];
				_requiredMagazines = _requiredMagazines - [0];
			};
		};
	}
	else
	{
		if ((count _requiredItems) > 0) then
		{
			_rNumber = round ((count _requiredItems) - 1);
			_array = _requiredItems select _rNumber;
			_name = _array select 0;
			_number = _array select 1;
			
			if (_number > 0) then
			{		
				if ((_name == "Explosive") or (_name == "Grenade")) then
				{
					if (_name == "Explosive") then
					{
						_name = weaponsExplosives select (round (random ((count weaponsExplosives) - 1)));
					}
					else
					{
						_name = weaponsGrenade select (round (random ((count weaponsGrenade) - 1)));
					};
				};
				
				_magMass = getNumber (_cfgMagazines >> _name >> "Mass");
				
				_array set [1,(_number - 1)];
				_requiredItems set [_rNumber,_array];
				
				if (_capacity < _magMass) exitWith {};
				_unit addItem _name;
				_capacity = _capacity - _magMass;
			}
			else
			{
				_requiredItems set [_rNumber,0];
				_requiredItems = _requiredItems - [0];
			};
		};
	};
};


_magazines = magazines _unit;

if ((count _magazines) <= 0) then // restart if it's not going so well.... mags wise.
{
	nul = [_unit,_level] execVM "fnc_generate_loadout.sqf";
};

/*
_weapon = currentWeapon _unit;
_unit action ["loadmagazine",_unit, _unit, 0, 1 ,_weapon, _weapon];
*/
reload _unit;

Share this post


Link to post
Share on other sites

Upto now i did not read ur script but i suggest to try this in ur init line:

 null = [this,3] execVM "fnc_generate_loadout.sqf";
 this addEventHandler ["Respawn",{[(_this select 0),3] execVM "fnc_generate_loadout.sqf"}];

Share this post


Link to post
Share on other sites

Il use                         null = [this,3] execVM "fnc_generate_loadout.sqf"; this addeventhandler ["Respawn","[_this,3] execVM 'fnc_generate_loadout.sqf'"];

 

 

Change that to

null = [this,3] execVM "fnc_generate_loadout.sqf"; this addeventhandler ["Respawn","[_this select 0,3] execVM 'fnc_generate_loadout.sqf'"];

"_this select 0" instead of just "_this"

Share this post


Link to post
Share on other sites

Hm , maybe i do somthing wrong here. Both of your codes work when run mission but when spawn same default rifleman. 

 

Maybe problem is in other place.  Il try to make deathmatch in namalsk map , in that big city. I placed around deadzone what work when i tested, then i placed 16 spawn and enable in mp 5sec delay what works. Then i apply 16 units from bluefort near thos spawns so i have 16playable slots, then i edit unit to player/playable and use your codes in INITIALIZATION log then ok.          Is ther any other way to add them ?

Share this post


Link to post
Share on other sites

did u test what happens on the 2nd and 3rd time u respawn?

Share this post


Link to post
Share on other sites

did u test what happens on the 2nd and 3rd time u respawn?

 

Yes , spawned rifleman gear. Maybe i could try delete units and place them again maybe fix somthing xD

Share this post


Link to post
Share on other sites

ok, add some sytemchats in line 12 17 23 25 and one before line 1 plz.

 

like

systemChat "0";
 
systemChat "12";

systemChat "17";

systemChat "23";

systemChat "25";

and look at you .rpt file for errors.

Share this post


Link to post
Share on other sites

You mean in fnc_generate_loadout.sqf file yes?    

 

 

Il add them, didnt change nothing.  Maybe it help, before i log into character in chat go alot texts fast and somtimes i spawn as rifleman and few sec later when texts stop i change to random gear.

Share this post


Link to post
Share on other sites

ok, add some sytemchats in line 12 17 23 25 and one before line 1 plz.

 

like

systemChat "0";
 
systemChat "12";

systemChat "17";

systemChat "23";

systemChat "25";

and look at you .rpt file for errors.

 

Where is this rpt file ? In mission map i have only pbo and sqf files

Share this post


Link to post
Share on other sites

open your windows explorer file manager an click into its adress line.

substitute the content of it with:

 

%userprofile%\AppData\Local\Arma 3

 

press enter and look for arma3.rpt

 

 

but before looking for that file run arma please and respawn. i want to know which chat lines u get

Share this post


Link to post
Share on other sites

When i respawn i get only systemchat ( player was killed ) non of thos add lines. 

il check that rpt

 

I found thos rpt but i have 10 of them.  Withs dates, should i check latest one ?

Share this post


Link to post
Share on other sites

latest one and check the part after u started the game the last time.

Share this post


Link to post
Share on other sites

latest one and check the part after u started the game the last time.

When i check file i found 13 hint on error when im only withs namalsk map

 

19:49:14 Item str_editor_error_tree_sel listed twice
19:49:14 Item str_editor_error_tree_item listed twice
19:49:14 Item str_editor_error_rtn_val_str listed twice
19:49:14 Item str_editor_error_rtn_val_nil listed twice
19:49:14 Item str_editor_error_rtn_val_false listed twice
19:49:14 Item str_editor_error_overlay_exists listed twice
19:49:14 Item str_editor_error_no_playable_save listed twice
19:49:14 Item str_editor_error_no_playable_preview listed twice
19:49:14 Item str_editor_error_no_overlay listed twice
19:49:14 Item str_editor_error_invalid_overlay_name listed twice
19:49:14 Item str_editor_error_has_links listed twice
19:49:14 Item str_editor_error_child_objs listed twice
19:51:00 Error: weapon [bipod_01_F_snd] still has its shape, ref_count=3
 
And 85 when i have other mods weapon and uniforms. Cup all, Nato rus weapons and tryk uniforms,
Search "Error" (85 hits in 1 file)
  C:\Users\Mairis\AppData\Local\Arma 3\arma3_2016-03-16_19-27-23.rpt (85 hits)
Line 2681: 19:27:33 Item str_editor_error_tree_sel listed twice
Line 2683: 19:27:33 Item str_editor_error_tree_item listed twice
Line 2685: 19:27:33 Item str_editor_error_rtn_val_str listed twice
Line 2687: 19:27:33 Item str_editor_error_rtn_val_nil listed twice
Line 2689: 19:27:33 Item str_editor_error_rtn_val_false listed twice
Line 2691: 19:27:33 Item str_editor_error_overlay_exists listed twice
Line 2693: 19:27:33 Item str_editor_error_no_playable_save listed twice
Line 2695: 19:27:33 Item str_editor_error_no_playable_preview listed twice
Line 2697: 19:27:33 Item str_editor_error_no_overlay listed twice
Line 2699: 19:27:33 Item str_editor_error_max_groups_reached listed twice
Line 2701: 19:27:33 Item str_editor_error_link_wp_unit_grp listed twice
Line 2703: 19:27:33 Item str_editor_error_link_wp_grp_unit listed twice
Line 2705: 19:27:33 Item str_editor_error_invalid_overlay_name listed twice
Line 2707: 19:27:33 Item str_editor_error_has_links listed twice
Line 2709: 19:27:33 Item str_editor_error_delete_player listed twice
Line 2711: 19:27:33 Item str_editor_error_ctrl_player_unit listed twice
Line 2713: 19:27:33 Item str_editor_error_child_objs listed twice
Line 5982: 19:28:07 Error: Bone cheek_lf doesn't exist in skeleton OFP2_ManSkeleton
Line 5983: 19:28:07 Error: Bone nose_tip doesn't exist in skeleton OFP2_ManSkeleton
Line 5984: 19:28:07 Error: Bone lip_uplb doesn't exist in skeleton OFP2_ManSkeleton
Line 5985: 19:28:07 Error: Bone jaw_ls doesn't exist in skeleton OFP2_ManSkeleton
Line 5986: 19:28:07 Error: Bone lip_uplf doesn't exist in skeleton OFP2_ManSkeleton
Line 5987: 19:28:07 Error: Bone lip_lc doesn't exist in skeleton OFP2_ManSkeleton
Line 5988: 19:28:07 Error: Bone lip_lwlb doesn't exist in skeleton OFP2_ManSkeleton
Line 5989: 19:28:07 Error: Bone lip_lwlf doesn't exist in skeleton OFP2_ManSkeleton
Line 5990: 19:28:07 Error: Bone jaw_lm doesn't exist in skeleton OFP2_ManSkeleton
Line 5991: 19:28:07 Error: Bone zig_lb doesn't exist in skeleton OFP2_ManSkeleton
Line 5992: 19:28:07 Error: Bone lip_lwm doesn't exist in skeleton OFP2_ManSkeleton
Line 5993: 19:28:07 Error: Bone lip_upm doesn't exist in skeleton OFP2_ManSkeleton
Line 5994: 19:28:07 Error: Bone ear_l doesn't exist in skeleton OFP2_ManSkeleton
Line 5995: 19:28:07 Error: Bone corr doesn't exist in skeleton OFP2_ManSkeleton
Line 5996: 19:28:07 Error: Bone tongue_m doesn't exist in skeleton OFP2_ManSkeleton
Line 5997: 19:28:07 Error: Bone tongue_f doesn't exist in skeleton OFP2_ManSkeleton
Line 5998: 19:28:07 Error: Bone eyebrow_lb doesn't exist in skeleton OFP2_ManSkeleton
Line 5999: 19:28:07 Error: Bone eyebrow_lf doesn't exist in skeleton OFP2_ManSkeleton
Line 6000: 19:28:07 Error: Bone eyebrow_lm doesn't exist in skeleton OFP2_ManSkeleton
Line 6001: 19:28:07 Error: Bone zig_lm doesn't exist in skeleton OFP2_ManSkeleton
Line 6002: 19:28:07 Error: Bone eye_upl doesn't exist in skeleton OFP2_ManSkeleton
Line 6003: 19:28:07 Error: Bone eye_lwl doesn't exist in skeleton OFP2_ManSkeleton
Line 6004: 19:28:07 Error: Bone cheek_l doesn't exist in skeleton OFP2_ManSkeleton
Line 6005: 19:28:07 Error: Bone cheek_lb doesn't exist in skeleton OFP2_ManSkeleton
Line 6006: 19:28:07 Error: Bone zig_lt doesn't exist in skeleton OFP2_ManSkeleton
Line 6007: 19:28:07 Error: Bone nose_l doesn't exist in skeleton OFP2_ManSkeleton
Line 6008: 19:28:07 Error: Bone cheek_lm doesn't exist in skeleton OFP2_ManSkeleton
Line 6009: 19:28:07 Error: Bone nose_r doesn't exist in skeleton OFP2_ManSkeleton
Line 6010: 19:28:07 Error: Bone forehead_r doesn't exist in skeleton OFP2_ManSkeleton
Line 6011: 19:28:07 Error: Bone forehead_m doesn't exist in skeleton OFP2_ManSkeleton
Line 6012: 19:28:07 Error: Bone forehead_l doesn't exist in skeleton OFP2_ManSkeleton
Line 6013: 19:28:07 Error: Bone cheek_rb doesn't exist in skeleton OFP2_ManSkeleton
Line 6014: 19:28:07 Error: Bone eye_lwr doesn't exist in skeleton OFP2_ManSkeleton
Line 6015: 19:28:07 Error: Bone cheek_r doesn't exist in skeleton OFP2_ManSkeleton
Line 6016: 19:28:07 Error: Bone zig_rt doesn't exist in skeleton OFP2_ManSkeleton
Line 6017: 19:28:07 Error: Bone zig_rm doesn't exist in skeleton OFP2_ManSkeleton
Line 6018: 19:28:07 Error: Bone cheek_rf doesn't exist in skeleton OFP2_ManSkeleton
Line 6019: 19:28:07 Error: Bone cheek_rm doesn't exist in skeleton OFP2_ManSkeleton
Line 6020: 19:28:07 Error: Bone eyebrow_rm doesn't exist in skeleton OFP2_ManSkeleton
Line 6021: 19:28:07 Error: Bone eyebrow_rf doesn't exist in skeleton OFP2_ManSkeleton
Line 6022: 19:28:07 Error: Bone eye_upr doesn't exist in skeleton OFP2_ManSkeleton
Line 6023: 19:28:07 Error: Bone eyebrow_rb doesn't exist in skeleton OFP2_ManSkeleton
Line 6024: 19:28:07 Error: Bone tongue_b doesn't exist in skeleton OFP2_ManSkeleton
Line 6025: 19:28:07 Error: Bone ear_r doesn't exist in skeleton OFP2_ManSkeleton
Line 6026: 19:28:07 Error: Bone neck_l doesn't exist in skeleton OFP2_ManSkeleton
Line 6027: 19:28:07 Error: Bone lip_uprf doesn't exist in skeleton OFP2_ManSkeleton
Line 6028: 19:28:07 Error: Bone neck_r doesn't exist in skeleton OFP2_ManSkeleton
Line 6029: 19:28:07 Error: Bone lip_uprb doesn't exist in skeleton OFP2_ManSkeleton
Line 6030: 19:28:07 Error: Bone lip_rc doesn't exist in skeleton OFP2_ManSkeleton
Line 6031: 19:28:07 Error: Bone lip_lwrb doesn't exist in skeleton OFP2_ManSkeleton
Line 6032: 19:28:07 Error: Bone lip_lwrf doesn't exist in skeleton OFP2_ManSkeleton
Line 6033: 19:28:07 Error: Bone neck_b doesn't exist in skeleton OFP2_ManSkeleton
Line 6034: 19:28:07 Error: Bone zig_rb doesn't exist in skeleton OFP2_ManSkeleton
Line 6035: 19:28:07 Error: Bone neck_t doesn't exist in skeleton OFP2_ManSkeleton
Line 6036: 19:28:07 Error: Bone jaw_rf doesn't exist in skeleton OFP2_ManSkeleton
Line 6037: 19:28:07 Error: Bone jaw_lf doesn't exist in skeleton OFP2_ManSkeleton
Line 6038: 19:28:07 Error: Bone chin doesn't exist in skeleton OFP2_ManSkeleton
Line 6039: 19:28:07 Error: Bone jaw_rm doesn't exist in skeleton OFP2_ManSkeleton
Line 6040: 19:28:07 Error: Bone jaw_rs doesn't exist in skeleton OFP2_ManSkeleton
Line 6041: 19:28:07 Error: Bone jaw doesn't exist in skeleton OFP2_ManSkeleton
Line 6042: 19:28:07 Error: Bone headcutscene doesn't exist in skeleton OFP2_ManSkeleton
Line 6050: 19:28:09 Error: Bone hips doesn't exist in skeleton OFP2_ManSkeleton
Line 6051: 19:28:09 Error: Bone headcutscene doesn't exist in skeleton OFP2_ManSkeleton
Line 6052: 19:28:09 Error: Bone hips doesn't exist in skeleton OFP2_ManSkeleton
Line 6053: 19:28:09 Error: Bone headcutscene doesn't exist in skeleton OFP2_ManSkeleton
Line 6054: 19:28:09 Error: Bone hips doesn't exist in skeleton OFP2_ManSkeleton
Line 6055: 19:28:09 Error: Bone headcutscene doesn't exist in skeleton OFP2_ManSkeleton
Line 6235: 19:40:16 Error: weapon [bipod_01_F_snd] still has its shape, ref_count=3
 

Share this post


Link to post
Share on other sites

that eventhandler seems to be never activated. i have to think about it some time. maybe we should use another eventhandler but I never used those eventhandlers... im learning while helping. give me some minutes and we try another thing.

could u do another clean vanilla mission in virtual reality meanwhile? with one player only and the same script and init line. just to reduce the problem. and use the 2d editor for it cause eden is buggy.

Share this post


Link to post
Share on other sites

that eventhandler seems to be never activated. i have to think about it some time. maybe we should use another eventhandler but I never used those eventhandlers... im learning while helping. give me some minutes and we try another thing.

could u do another clean vanilla mission in virtual reality meanwhile? with one player only and the same script and init line. just to reduce the problem. and use the 2d editor for it cause eden is buggy.

 

 

ok i will try bit later when i get home :)

Share this post


Link to post
Share on other sites

that eventhandler seems to be never activated. i have to think about it some time. maybe we should use another eventhandler but I never used those eventhandlers... im learning while helping. give me some minutes and we try another thing.

could u do another clean vanilla mission in virtual reality meanwhile? with one player only and the same script and init line. just to reduce the problem. and use the 2d editor for it cause eden is buggy.

 

I did make it on VR map, withs 1spawn and 2playable units. Add thos scripts in mission map and unit log , but they dont work at all here.  I start to think i just need make all from 0 and then find what i did wrong

 

So i mad all from 0, only 1unit and 1 spawn to test faster, still same problem i found script owner topic where he gave this lines for respawn , il tryed with MP on event handler and respawn and without nothing. 

 

_x addEventHandler ["Respawn",

    {

        _newUnit = _this select 0;

        _oldUnit = _this select 1;

        [_newUnit,1] call fnc_generate_loadout;

    }];

 

Il check for errors again in rpt file and get 100errors , 

11:32:27 Item str_editor_error_tree_sel listed twice
11:32:27 Item str_editor_error_tree_item listed twice
11:32:27 Item str_editor_error_rtn_val_str listed twice
11:32:27 Item str_editor_error_rtn_val_nil listed twice
11:32:27 Item str_editor_error_rtn_val_false listed twice
11:32:27 Item str_editor_error_overlay_exists listed twice
11:32:27 Item str_editor_error_no_playable_save listed twice
11:32:27 Item str_editor_error_no_playable_preview listed twice
11:32:27 Item str_editor_error_no_overlay listed twice
11:32:27 Item str_editor_error_max_groups_reached listed twice
11:32:27 Item str_editor_error_link_wp_unit_grp listed twice
11:32:27 Item str_editor_error_link_wp_grp_unit listed twice
11:32:27 Item str_editor_error_invalid_overlay_name listed twice
11:32:27 Item str_editor_error_has_links listed twice
11:32:27 Item str_editor_error_delete_player listed twice
11:32:27 Item str_editor_error_ctrl_player_unit listed twice
11:32:27 Item str_editor_error_child_objs listed twice
11:33:01 Error: Bone cheek_lf doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone nose_tip doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_uplb doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone jaw_ls doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_uplf doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_lc doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_lwlb doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_lwlf doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone jaw_lm doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone zig_lb doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_lwm doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_upm doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone ear_l doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone corr doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone tongue_m doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone tongue_f doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone eyebrow_lb doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone eyebrow_lf doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone eyebrow_lm doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone zig_lm doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone eye_upl doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone eye_lwl doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone cheek_l doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone cheek_lb doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone zig_lt doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone nose_l doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone cheek_lm doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone nose_r doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone forehead_r doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone forehead_m doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone forehead_l doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone cheek_rb doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone eye_lwr doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone cheek_r doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone zig_rt doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone zig_rm doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone cheek_rf doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone cheek_rm doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone eyebrow_rm doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone eyebrow_rf doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone eye_upr doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone eyebrow_rb doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone tongue_b doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone ear_r doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone neck_l doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_uprf doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone neck_r doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_uprb doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_rc doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_lwrb doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone lip_lwrf doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone neck_b doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone zig_rb doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone neck_t doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone jaw_rf doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone jaw_lf doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone chin doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone jaw_rm doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone jaw_rs doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone jaw doesn't exist in skeleton OFP2_ManSkeleton
11:33:01 Error: Bone headcutscene doesn't exist in skeleton OFP2_ManSkeleton
11:33:03 Error: Bone hips doesn't exist in skeleton OFP2_ManSkeleton
11:33:03 Error: Bone headcutscene doesn't exist in skeleton OFP2_ManSkeleton
11:33:03 Error: Bone hips doesn't exist in skeleton OFP2_ManSkeleton
11:33:03 Error: Bone headcutscene doesn't exist in skeleton OFP2_ManSkeleton
11:33:03 Error: Bone hips doesn't exist in skeleton OFP2_ManSkeleton
11:33:03 Error: Bone headcutscene doesn't exist in skeleton OFP2_ManSkeleton
11:36:07 Error loading control bin\config.bin/RscDisplayArcadeUnit/controls/CA_ValueControl/
11:39:53 Error in expression <On Act.: {_x Setdammage 1} Foreach thislist>
11:39:53   Error position: <Act.: {_x Setdammage 1} Foreach thislist>
11:39:53   Error Missing ;
11:40:03 Error in expression <On Act.: {_x Setdammage 1} Foreach thislist>
11:40:03   Error position: <Act.: {_x Setdammage 1} Foreach thislist>
11:40:03   Error Missing ;
11:40:18 Error in expression <On Act.: {_x Setdammage 1} Foreach thislist>
11:40:18   Error position: <Act.: {_x Setdammage 1} Foreach thislist>
11:40:18   Error Missing ;
11:40:42 Error in expression <On Act.: {_x Setdammage 1} Foreach thislist>
11:40:42   Error position: <Act.: {_x Setdammage 1} Foreach thislist>
11:40:42   Error Missing ;
11:58:12 Error in expression <nul = [_this,_3] execVM "fnc_generate_loadout.sqf;>
11:58:12   Error position: <"fnc_generate_loadout.sqf;>
11:58:12   Error Missing ""

Share this post


Link to post
Share on other sites

If u have tried that code in the init line of the player then use

this

instead of

_x

Share this post


Link to post
Share on other sites

If u have tried that code in the init line of the player then use

this

instead of

_x

 

 

Yes i try boths ways.  I searched google so long , im kinda giving up already. And think about making one loadout for match, just to shoot out :)

Share this post


Link to post
Share on other sites

dont give up now.

 

try this to see if the event handler fires:

this addEventHandler ["Respawn",    
{
 sleep 10;
 systemChat " You r respawned :-)";
}];

Share this post


Link to post
Share on other sites

If that works then try this out:

 

 

 

d = [this,3] execVM "fnc_generate_loadout.sqf";

d = this addEventHandler ["Respawn",     
{
 _newUnit = _this select 0;
 _oldUnit = _this select 1;
 [_newUnit,1] execVM "fnc_generate_loadout.sqf";
}];

 

Share this post


Link to post
Share on other sites

Dont show that message or somthing , but il just tryed to find AI unit and killed him then showed Your respawned. But when i respawn i dont get that message.   Hm just know i get that message when i respawned somthing is working now :)

Share this post


Link to post
Share on other sites

Dont show that message or somthing , but il just tryed to find AI unit and killed him then showed Your respawned. But when i respawn i dont get that message.

 

If that works then try this out:

d = [this,3] execVM "fnc_generate_loadout.sqf";

d = this addEventHandler ["Respawn",     
{
 _newUnit = _this select 0;
 _oldUnit = _this select 1;
 [_newUnit,1] execVM "fnc_generate_loadout.sqf";
}];

 

I should write withs thos ''d'' or just null ?

 

Sweet it kinda work now :) Just question what i where i need change to get better loot  in your code ? Becous in that scrip 1-3 is , 1 civilian, 2mility and 3is military. I need for 3 so have big guns :P        

And when i have spawns what need , then im ready to play withs friends ? Or i need scrip somthing else for MP ?

Share this post


Link to post
Share on other sites

I should write withs thos ''d'' or just null ?

 

doesnt matter

Share this post


Link to post
Share on other sites

doesnt matter

 

 

Ok , now all is working :) big thanks to you.   

And its possible to script or somthing when Civilians kill Civilians i get +1 point not -1 ?    And now only left is write mode,mi/max players and game limits :)

 

And would this description.ext in file would be correct ?

author = "Pekulsh";
onLoadName = "Namalsk Town Deathmatch";
onloadmission=" N A M A L S K  T O W N  D E A T H M A T C H";
onloadintro = "Mission By Pekulsh";
onLoadMissionTime = 1;
onLoadIntroTime = 1;
loadScreen = "MissionSplash.jpg";

class Header
{
	gameType = DM;
	minPlayers = 1;
	maxPlayers = 19;
};

minScore=20;
avgScore=50;
maxScore=100;

respawn = "BASE";
respawnDelay = 5;
respawnDialog = false;

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×