raidunalexo 10 Posted January 12, 2016 When I attach the event handler HitPart to an playable character it works first time but after it dies it disappears after respawning the character. I tried a respawn script to re attach the event handler to the new body that doesn't work either. Any help be appreciated.Resolved the error. Thank You Share this post Link to post Share on other sites
EllaElectro 15 Posted January 16, 2016 Could you state how you solved the problem? Share this post Link to post Share on other sites
cervantes 330 Posted January 24, 2016 why you d'ont use a sqf init script for this? _vehicle = _this select 0; if(player in _vehicle)then{_vehicle = vehicle player;}; _unit addEventHandler ["HandleDamage",{private["_unit","_hitpart"]; _unit = _this select 0; _hitpart = _this select 1; _dam = _unit getHit _hitpart; if((_dam < 1) and (_hitpart != "?") and (alive _unit)) exitwith { [_unit,_hitpart,_dam] exec "\script\myscript.sqs"; }; }]; you can launch this script in your init script [_vehicle] execvm "hitpart.sqf"; and this working after respawn ;) Share this post Link to post Share on other sites
raidunalexo 10 Posted September 1, 2016 I might of forgot to mention that this was for Multiplayer but I figured it out using the [params, functionName, target, isPersistent, isCall] call BIS_fnc_MP; which was called when the player respawn it attaches the new scripts on all the computers, corpse had them removed. Works like a charm must be an internet game though Share this post Link to post Share on other sites