Rosso777 22 Posted August 5, 2021 Small private dedi server. Three players. One player very new and becoming frustrated with the difficult AI that lend a challenge to the other two but are a bit -too- difficult for the newbie. is there a way, using Steam ID/UID/playername, to provide a handicap to the new player? Perhaps decreased damage or something like that? Share this post Link to post Share on other sites
stanhope 407 Posted August 5, 2021 There are several things you can do to make it easier/harder for a given player yes. Changing the incoming damage on a player and changing the damage a player does (both with the hit eventhandler) come to mind. Share this post Link to post Share on other sites
Cysiu 13 Posted August 5, 2021 https://community.bistudio.com/wiki/getPlayerUID Share this post Link to post Share on other sites
Rosso777 22 Posted August 6, 2021 Thoughts on this? Do I even need to add the standard players to this if their damage is "normal" (set to damage * 1)? nul = [] spawn { sleep 1; switch (getPlayerUID player) do { case "3168468746512": { // noob player player addEventhandler ["HandleDamage",{ params ["_unit","_selection","_damage"]; _damage * 0.5; }]; case "5413546843212": { // veteran player 1 player addEventhandler ["HandleDamage",{ params ["_unit","_selection","_damage"]; _damage * 1; }]; case "6544164161261": // veteran player 2 player addEventhandler ["HandleDamage",{ params ["_unit","_selection","_damage"]; _damage * 1; }]; default {}; }; }; }; }; Share this post Link to post Share on other sites
beno_83au 1358 Posted August 6, 2021 56 minutes ago, Rosso777 said: Do I even need to add the standard players to this if their damage is "normal" (set to damage * 1)? No. In initPlayerLocal.sqf: if (getPlayerUID player == "3168468746512") then { player addEventHandler ["HandleDamage",{ params ["","","_damage"]; _damage * 0.5; }]; }; If it's just for the one player then you don't really need a switch, and an if...then should run faster anyway if you're just handling one player. If you wanted to specify differences for more than one player though, then I'd suggest a switch. On difficulty, there's things in https://community.bistudio.com/wiki/setUnitTrait that you could use, like the audible and camouflage coefs, and maybe load too. Edit: setUnitTrait might need to be run in onPlayerRespawn.sqf, not 100% sure so it'd be worth testing using one of the easier traits to test (medic/uavhacker/etc). 3 Share this post Link to post Share on other sites
Rosso777 22 Posted August 6, 2021 17 hours ago, beno_83au said: On difficulty, there's things in https://community.bistudio.com/wiki/setUnitTrait that you could use, like the audible and camouflage coefs, and maybe load too. this is a great idea. I will try all this and report back. Thanks! Share this post Link to post Share on other sites