SicSemperTyrannis 5 Posted March 11, 2013 I have spawn protection code that looks like this: /* Simple Spawn (Humans and vehicles) Protection Script by SicSemperTyrannis Use: [_unit] execVM "spawnProtection.sqf"; Unit is any human or vehicle object! */ _dist = 250; //Edit this to be the size (in meters) which you want to protect from spawn marker. _unit = _this select 0; if(isServer) exitWith {}; if(isNull _unit) exitWith { diag_log "Spawn protection called on null unit!"; }; _unit setVariable["spDist", _dist + 1]; diag_log format["!! Spawn Protection was issued to object (%1) !!", typeOf _unit]; if(isPlayer _unit) then { _unit addEventHandler ["Respawn", {[(_this select 0)] execVM "spawnProtection.sqf";}]; _unit addEventHandler ["HandleDamage", { _dmgUnit = _this select 0; if((_dmgUnit distance getMarkerPos "respawn_west" < (_dmgUnit getVariable["spDist"]))) then { false } else { true }; }]; }; while{true} do { scopeName "spawnProtectLoop"; if(isNull _unit) then { diag_log "!! Killing protection for obsolete unit object !!"; breakOut "spawnProtectLoop"; }; if((_unit distance getMarkerPos "respawn_west" < (_unit getVariable["spDist"]))) then { _unit allowDamage false; } else { _unit allowDamage true; }; sleep 1; }; It's applied to each object on the client's side, but when people crash helicopters sometimes they will continue exploding... forever, and only outside of the spawn protection zone. Meaning that by this point "allowDamage" should be set to false on any and all clients (the event handler doesn't apply to vehicles) Then I saw this video: yAe7cHSQofM I'm starting to think it's related to the API itself. Share this post Link to post Share on other sites
JojoTheSlayer 35 Posted March 11, 2013 LoL, now make something similar for cars. Share this post Link to post Share on other sites
jonbons 13 Posted March 11, 2013 I have reproduced the bug, it happens in SP/MP when the vehicle has an EventHandler for HandleDamage that returns false. Here is the feedback ticket with reproducible mission: http://feedback.arma3.com/view.php?id=4103 Share this post Link to post Share on other sites
SicSemperTyrannis 5 Posted March 11, 2013 Well, as you can see I only enabled the event handler when they were a player and I still got it. I think it also does it with client-side allowDamage. Share this post Link to post Share on other sites