Combat Check BEFORE humanity skin change

Manatee Hunter

Valued Member!
Hey,

While bringing up the idea of adding skins at varying humanity levels with my players (And perhaps for achieving various target stats), one of them mentioned that being transformed mid combat was hinder gameplay and could easily get you killed... He's totally right and i'm wondering why its been allowed to stay in such a state for so long.

How hard would it be to do a combat check before the humanity skin change? Say you're fighting against a group, you shoot one person and your humanity morphs from hero to survivor or survivor to bandit... That can be a devastating loss of time in some situations. If the combat check is easy to do it may be worth implementing seeing as how I already have to have a custom player_spawn_2.sqf due to bugs related to morphing into non existent skin IDs on Celle (Yey get TPd and/or loose your stuff!).

Any thoughts?
 
It probably would not be hard.
I assume there is a public variable when a player is in combat. You can just put in a script replacing some DayZ code that will say, "if player is in combat, do not switch skin until they're out of combat"
Maybe have it tick a variable like "player waiting to get skin switched"
 
guys im sorry to invade your thread but im on page 13 of 35 looking for information on how to change the hero skin to soldier. can you guys point me in the right direction. once again sorry for posting in here but i searched several times and here i am.
 
guys im sorry to invade your thread but im on page 13 of 35 looking for information on how to change the hero skin to soldier. can you guys point me in the right direction. once again sorry for posting in here but i searched several times and here i am.
You may find this of use: http://opendayz.net/threads/random-clothing-parcels.8423/

In your @DayZ/dayz_code.pbo, there's a file in the folder actions titled player_wearClothes.sqf
You can mold the lines near 33 like so:
Code:
switch (_item) do {
case "Skin_Sniper1_DZ": {
_model = "Sniper1_DZ";
};
case "Skin_Camo1_DZ": {
_model = "Camo1_DZ";
};
case "Skin_Soldier1_DZ": {
_model = "Soldier1_DZ";
};
case "Skin_Survivor2_DZ": {
_model = "Survivor2_DZ";
if (_isBandit) then {
_model = "Bandit1_DZ";
};
if (_isHero) then {
_model = "Soldier1_DZ";
};
};
};

You can do the "fixes" trick like done in the following thread:
http://opendayz.net/threads/100-custom-loot-tables-tutorial.8474/

Be sure to check out the Resources thread (linked in my signature) in case you have any more inquiries.
 
If (nead to change skin) then
{
Code:
privare [_combattimeout, dayz_combat];
while {dayz_combat} do
{
    _combattimeout = player getVariable["combattimeout",0];
    if (_combattimeout > 0) then {dayz_combat = true;} else {dayz_combat = false;};
    sleep 0.5;
};
///////////////////////
now humanitymorph or switchmodel;
};
Better to do it in a separate file.
 
Back
Top