Mondetta 5 Posted July 6, 2017 how do i addscore when a enemy unit is killed anywhere on the map my unit gains 10 points? Share this post Link to post Share on other sites
Tschuuut 6 Posted July 10, 2017 You can use the addScore function in a killed Event Handler like this: if(isServer) then { unitKilled = { { if(side _x isEqualTo WEST) then { _x addScore 10; //Or whatever you want (addScore only works in MP) }; } forEach allPlayers; }; { if(side _x isEqualTo EAST) then { _x addEventHandler ["killed", unitKilled]; }; } forEach allUnits; }; (create a init.sqf in your mission directory and paste the code above) This works for MP The Unit which has killed the enemy will get the score in addition to the default score Share this post Link to post Share on other sites
HallyG 239 Posted July 10, 2017 Here you go I might need to bookmark this website after all. 1 Share this post Link to post Share on other sites
Mondetta 5 Posted July 10, 2017 5 hours ago, Tschuuut said: You can use the addScore function in a killed Event Handler like this: if(isServer) then { unitKilled = { { if(side _x isEqualTo WEST) then { _x addScore 10; //Or whatever you want (addScore only works in MP) }; } forEach allPlayers; }; { if(side _x isEqualTo EAST) then { _x addEventHandler ["killed", unitKilled]; }; } forEach allUnits; }; (create a init.sqf in your mission directory and paste the code above) This works for MP The Unit which has killed the enemy will get the score in addition to the default score THANKYOU ill try it out when i get home Share this post Link to post Share on other sites