Jump to content
MattL

[RELEASE] Recover Skin From Dead Players or AI

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 :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Guest

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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. 

Share this post


Link to post
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!

Share this post


Link to post
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!

 

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

 

Thanks

Share this post


Link to post
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.

Share this post


Link to post
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

 

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. 

Share this post


Link to post
Share on other sites

 

 

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

Share this post


Link to post
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 :)

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By FG_Trap
      Made a quick static ai mission that spawns on restart. 
      12 ai patrol the compound 
      4 Static m2's
      1 Heli Patrolling the compound 
      Crate for who ever clears all the ai.
      Some screenshots of the compound 


       
      https://github.com/Trapxxgods/Wai-Static-Mission 
    • By JakeQue
      Usually it would state 
       
      "You cannot gut this animal without a knife"
       
      but now the scroll  action is dead and I don't get an error.
       
      Please help!
    • By victorks
      my first work in editin :) https://uploaddeimagens.com.br/imagens/20180307202515_1-jpg https://uploaddeimagens.com.br/imagens/20180307202245_1-jpg DOWNLOAD: https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0 AI M2 NEED WAI: https://pastebin.com/GJMnPvZP ON THE MAP: https://pastebin.com/cyqH9rNV  
       
      https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0
       
       
       
       
       
       
       
       
       
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...