nebulazerz 18 Posted May 26, 2017 Hi, I have been away from arma coding for about 6 months to take some classes and I am picking back up on a mission I almost had finished when i left it. I have one major issue that I cannot seem to fix where I can die the first time I spawn in the mission, but I am invincible when I respawn. Any player that joins is invincible from the start. I have been digging through my code all morning but I cant find any line that would change damage after death. Anyone have any ideas on what could be happening here? Its been a little bit so I am kind of rusty at coding but its all coming back to me as I look it over, just not certain about some specifics. Could it be this is my description.ext? respawn = 3; respawnOnStart = -1; Share this post Link to post Share on other sites
Mokka 29 Posted May 26, 2017 Are you using any additional scripts? The default Arma 3 Respawn system does not allow settings, that make players invincible after they have respawned. https://community.bistudio.com/wiki/Arma_3_Respawn Your issue might be down to using the Vanilla Respawn System/any Third-Party Revive system. 1 Share this post Link to post Share on other sites
nebulazerz 18 Posted May 27, 2017 So then i should write my own respawn system or use one from the community and it should fix the problem? I will start with trying that. Edit: I am trying to use respawn= 0; now with the onPlayerKilled but it takes me right to the death screen. Is there something specific I need to put in that EH file to stop it from ending the game? this is what I am currently trying in there. // Set Respawn Pos switch (side player) do { case west: { _posRandom = ["respawn_west1","respawn_west2"] call bis_fnc_selectRandom; _position = getMarkerPos _posRandom vectorAdd [0,0,400]; [_position] call neb_fnc_core_setStartingPos; }; case east: { _posRandom = ["respawn_east1","respawn_east2"] call bis_fnc_selectRandom; _position = getMarkerPos _posRandom vectorAdd [0,0,400]; [_position] call neb_fnc_core_setStartingPos; }; }; The function just makes sure that the player respawns correctly by checking in a loop until they are spawned. Edit 2: Using respawn= 3; with the above seems to fix the problem. thanks for the help. Edit 3: Nevermind, it seems I can kill myself with a grenade but cannot die any other way. Still working on a solution. Edit 4: I have recorded a video of the bug in action. You can see the health bar jumping as if I am taking damage but everytime I take new damage it resets my health to 100% then gives me the new damage. Seems it could be something with one of my eventhandlers. Share this post Link to post Share on other sites
nebulazerz 18 Posted June 6, 2017 I am still having this issue, I cant find anything in my code that would cause this to happen. Has anyone else had this happen? Share this post Link to post Share on other sites
sarogahtyp 1108 Posted June 6, 2017 On 27.05.2017 at 11:53 AM, nebulazerz said: Edit 4: I have recorded a video of the bug in action. You can see the health bar jumping as if I am taking damage but everytime I take new damage it resets my health to 100% then gives me the new damage. Seems it could be something with one of my eventhandlers. Why not showing ur EHs if u think it could be the cause? Something like this could cause that behaviour: _unit addEventHandler ["HandleDamage", {0}]; the important thing there is that the code which is executed by the EH returns 0 1 Share this post Link to post Share on other sites
nebulazerz 18 Posted June 6, 2017 11 minutes ago, sarogahtyp said: Why not showing ur EHs if u think it could be the cause? Something like this could cause that behaviour: _unit addEventHandler ["HandleDamage", {0}]; the important thing there is that the code which is executed by the EH returns 0 Holy crap, thanks... never thought to Cntrl + F "handledamage". Looks like i started experimenting with damage reduction and forgot about it -_- Found this in my function library (in a level reward script) player addeventhandler ["HandleDamage",{(_this select 2) / 10;} ]; Share this post Link to post Share on other sites
sarogahtyp 1108 Posted June 6, 2017 fix: player addeventhandler ["HandleDamage", { if ((_this select 2) <= 0) exitWith {}; ((_this select 2) / 10)} ]; 1 Share this post Link to post Share on other sites
nebulazerz 18 Posted June 6, 2017 1 hour ago, sarogahtyp said: fix: player addeventhandler ["HandleDamage", { if ((_this select 2) <= 0) exitWith {}; ((_this select 2) / 10)} ]; Thanks, Ill try this out in my bubble effect instead of using allowDamage false. I plan on making a sort of tank class if you buy the armor from the shop that gives you the skill. I could even make different variations of damage reduction. Is there a way to make this effect everyone inside a certain area? would be cool to have players follow the tank class around and stay inside his defense bubble to take less damage while advancing the enemy. I have decided using this in level rewards though is a bad idea because it would bring a lot of balance issues for new players. But I am also thinking about creating a deployable Item that is on a time limit and creates a defense shield where you take less damage inside. Here is my bubble effect currently, its activated by putting on a certain type of clothing. fnc_bubEffect = { params[ "_objNetID" ]; _unit = objectFromNetId _objNetID; _unit setVariable[ "bubEffect", true ]; //local object variable if ( local _unit ) then { _unit allowDamage false; //AL and EG }; _unit setAnimSpeedCoef 2;//Unsure of locality needs testing _unit switchMove "AmovPercMstpSnonWnonDnon_EaseIn"; //AG and EL _unit setAnimSpeedCoef 0; //Unsure of locality needs testing while ( _unit getVariable[ "bubEffect", false ] ) do { drop [ //EL ["\A3\data_f\ParticleEffects\Universal\Universal",16,13,7,0],"","BillBoard", 1,1,[0,0.25,1],[0,0,0], random pi*2,1.277,1,0, [3], [[1,0,0,.5],[1,0,0,.5]], [10000], 0,0,"","", _unit,0, false,-1 ]; playSound "electricshock"; //EL _unit switchMove "AmovPercMstpSnonWnonDnon_Ease"; //AG and EL sleep 0.25; //This is the equivilent of you action per tick 6/24 = 0.25 seconds }; }; _skillE = [ player, // 0 object "Bubble", // 1 action title "images\blinkicon.paa", // 2 idle icon "images\blinkicon.paa", // 3 progress icon "player getvariable [ 'Bubble', false ]", // 4 condition to show "true", // 5 condition for action // 6 code executed on start { //Create a unique name for the jip queue [ netId player ] remoteExec [ "fnc_bubEffect", 0, format[ "%1_bub", netId player ] ]; }, // 7 code executed per ACTION tick ( Range 0 - 24 ), tick duration = action duration / MAX tick 24 {}, // 8 code executed on completion { //No JIP [ netId player ] remoteExec [ "fnc_bubFinish", 0 ]; //Remove start from JIP queue remoteExec [ "", format[ "%1_bub", netId player ] ] }, // 9 code executed on interruption { //No JIP [ netId player ] remoteExec [ "fnc_bubFinish", 0 ]; //Remove start from JIP queue remoteExec [ "", format[ "%1_bub", netId player ] ] }, [], // 10 arguments 6, // 11 action duration 0, // 12 priority false, // 13 remove on completion false // 14 show unconscious ] call BIS_fnc_holdActionAdd; Share this post Link to post Share on other sites