Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //_bambiPlayer addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}]; //Changed this to below
- _bambiPlayer addEventHandler
- ["MPKilled",
- {
- _player = _this select 0;
- _lastEnemy = _player getVariable "LastEnemy"; //This identifies the last enemy that damaged the player
- if(_lastEnemy != ObjNull)then
- {
- [_this,_lastEnemy] call ExileServer_object_player_event_onMpKilled;
- };
- }
- ];
- _bambiPlayer addMPEventHandler ["HandleDamage", {_this call ExileServer_object_player_event_onHandleDamage}];
- /**********************************************************************/
- //THIS IS ExileServer_object_player_event_onHandleDamage.sqf
- private["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile"];
- _unit = _this select 0;
- _selectionName = _this select 1;
- _amountOfDamage = _this select 2;
- _sourceOfDamage = _this select 3;
- _typeOfProjectile = _this select 4;
- _unit setBleedingRemaining 90;
- if(_sourceOfDamage != ObjNull) then
- {
- _unit setVariable ["LastEnemy", _this select 3]; // This identifies the last source of damage and sets a variable against the player "LastEnemy"?
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement