Jump to content

[RELEASE] Recover Skin From Dead Players or AI


MattL

Recommended Posts

Although last night I did have someone lose all their humanity and inventory upon putting on a skin while still looting from the AI's inventory.

 

I told em to slow downnn, take a breath, wait till you're done looting, it ain't going nowhere!  

 

Impatience will get you nowhere fast in DayZ :)

That's just a bug with putting on skins. I believe it resides in player_spawnHumanityMorph or some such.

Link to comment
Share on other sites

Awesome work man!

I got this running on Overpoch Sahrani with DZAI, DZMS, and WAI.

 

Works like a muddah phackin charm!

my i ask where you placed your //Script addition to add skin to units gear in  DZMS DZMSAIKilled.sqf?

Link to comment
Share on other sites

  • 4 weeks later...

We might have found a conflict. Our Admin Tools quit showing up with this installed. The "Admin" Menu was just not avaialble. Should be noted that the issue seemed sporadic. Menu would be there 20% of the time. Usually after a death or server restart. Then it would dissapear.

 

Removing the Recover Skin script returned the Admin menu.

Link to comment
Share on other sites

We might have found a conflict. Out Admin Tools quit showing up with this installed. The "Admin" Menu was just not avaialble. Should be noted that the issue seemed sporadic. Menu would be there 20% of the time. Usually after a death or server restart. Then it would dissapear.

 

Removing the Recover Skin script returned the Admin menu.

That's extremely odd considering that the script itself doesn't execute until the client has died. It shouldn't affect anything.

Link to comment
Share on other sites

  • 2 months later...

those files aren't meant to be drag and drop replace, you're supposed to use them as an example to edit your existing files. 

 

From your readme =P

 
 

DZAI Instructions: 
Copy ai_death.sqf from the extra files folder into DZAI/Compile/ in your server pbo. Replace the standard one with the one included.
 
 DZMS Instructions:
 Copy DZMSAIKilled.sqf from the extra files folder into DZMS/Scripts/ in your server pbo. Replace the standard one with the one included.

 
Just saying.  You did a good job on the script though.
Link to comment
Share on other sites

 

From your readme =P

 
 

DZAI Instructions: 
Copy ai_death.sqf from the extra files folder into DZAI/Compile/ in your server pbo. Replace the standard one with the one included.
 
 DZMS Instructions:
 Copy DZMSAIKilled.sqf from the extra files folder into DZMS/Scripts/ in your server pbo. Replace the standard one with the one included.

 
Just saying.  You did a good job on the script though.

 

I wrote that post before one of my buddies rewrote the install and he now hosts it on his site. 

Link to comment
Share on other sites

Hello MattL!

Your code is incredible simple and effective!

I just did my bit of work to make it more simple: Just add that at the end of init.sqf and voyla! We have Take Clothes!

 

[] spawn {
	private ["_playerBody","_skin","_skinOk","_result"];
	waitUntil {r_player_dead};
	_playerBody = player;
	_skin = typeOf _playerBody;
	_skin = "Skin_" + _skin;
	_skinOk = isClass (configFile >> "CfgMagazines" >> _skin);
	if (_skinOk) then {
		_result = [_playerBody, _skin] call BIS_fnc_invAdd;
		if (!_result) then {
			(unitBackpack _playerBody) addMagazineCargoGlobal [_skin, 1];
		};
	};
};
The line waitUntil {r_player_dead} check for player death, but since this is a boolean check (true/false) it has little to no performance impact!
Link to comment
Share on other sites

  • 3 weeks later...

Hello MattL!

Your code is incredible simple and effective!

I just did my bit of work to make it more simple: Just add that at the end of init.sqf and voyla! We have Take Clothes!

 

[] spawn {
	private ["_playerBody","_skin","_skinOk","_result"];
	waitUntil {r_player_dead};
	_playerBody = player;
	_skin = typeOf _playerBody;
	_skin = "Skin_" + _skin;
	_skinOk = isClass (configFile >> "CfgMagazines" >> _skin);
	if (_skinOk) then {
		_result = [_playerBody, _skin] call BIS_fnc_invAdd;
		if (!_result) then {
			(unitBackpack _playerBody) addMagazineCargoGlobal [_skin, 1];
		};
	};
};
The line waitUntil {r_player_dead} check for player death, but since this is a boolean check (true/false) it has little to no performance impact!

 

Hey Donnovan, so just put this at the end of the init and nothing else? No code needed anywhere else for ai etc?

 

Thanks

Link to comment
Share on other sites

Hey Donnovan, so just put this at the end of the init and nothing else? No code needed anywhere else for ai etc?

 

Thanks

It won't work for ai. If you read the code it's only designed for the player. Depending on your ai system it wouldnt be hard to throw something similar to this into it.

Link to comment
Share on other sites

  • 1 month later...

Hey Donnovan, so just put this at the end of the init and nothing else? No code needed anywhere else for ai etc?

 

Thanks

 

Yes, no code needed anywere else.

Incorrect. The code you posted will only work for players. They asked if there is other code needed for ai, which there is. 

Link to comment
Share on other sites

  • 1 month later...

 

 

Matt, nice script. I am running overpoch with Zupa's skins, how can overwatch skins be added to players bodies for recovery? thx for your time!

 

If the skin does not have a magazine associated with it, then it can't be done, at least not in any way that I know how

Link to comment
Share on other sites

I had a similar Problem with the FR_Assault_R Skin, this also dont have a Skin_Base Magazine, so made some changes in the take_clothes.sqf:

 

http://pastebin.com/DiC5FvkY

 

This way you can define some skins which morph you right away into the skin. 

I've done this only iwth one skins, but you can easy modify it to get it done with multiple skins, defined in some array ;)

 

Just a simple change, i think more Overpoch (i hate this mod actually ^^) Owners are interessted in this Matt :)

Link to comment
Share on other sites

I had a similar Problem with the FR_Assault_R Skin, this also dont have a Skin_Base Magazine, so made some changes in the take_clothes.sqf:

 

http://pastebin.com/DiC5FvkY

 

This way you can define some skins which morph you right away into the skin. 

I've done this only iwth one skins, but you can easy modify it to get it done with multiple skins, defined in some array ;)

 

Just a simple change, i think more Overpoch (i hate this mod actually ^^) Owners are interessted in this Matt :)

 

Nice one SchwEde :)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...