rubberkite 19 Posted January 17, 2019 Hello, I am working on a new release of my warfare and I have a problem, I wrote here hopefully somebody from forum got same problem and found already a solution I have a check that is based on baseclass, soldierwb/eb/gb, the problem is and I wonder why and how is possible that RHS and CUP did something so stupid: their parent class are based on wrong parent base class. example cup OPFOR Russian are based on soldierWB instead of EB instead of all OPFOR Russia from RHS are based on soldierGB instead of EB, this generate some bug with all the scripts in warfare that use that check, /* Root classes */ westSoldierBaseClass = 'SoldierWB'; eastSoldierBaseClass = 'SoldierEB'; resistanceSoldierBaseClass = 'SoldierGB'; server side script: if ((leader _team) isKindOf westSoldierBaseClass) then {_sideJoined = west}; if ((leader _team) isKindOf eastSoldierBaseClass) then {_sideJoined = east}; I need an alternative way to check if JIP player side (server side script) thanks in advance for any good hint hopefully addon maker will try do use proper base class for soldiers in further updates. Rubber Share this post Link to post Share on other sites
davidoss 552 Posted January 17, 2019 use playerConnectedMEH https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#PlayerConnected Share this post Link to post Share on other sites
rubberkite 19 Posted January 17, 2019 Thanks but I don't see any parameter on that return the player connected side. id: Number - unique DirectPlay ID (very large number). It is also the same id used for user placed markers (same as _id param) uid: String - getPlayerUID of the joining client. The same as Steam ID (same as _uid param) name: String - profileName of the joining client (same as _name param) jip: Boolean - didJIP of the joining client (same as _jip param) owner: Number - owner id of the joining client (same as _owner param) Share this post Link to post Share on other sites
davidoss 552 Posted January 17, 2019 Ah you want side no JIP. Does simple check side group are not enough? You can also check for config entry "side" to get proper unit side occupied by player Share this post Link to post Share on other sites
rubberkite 19 Posted January 17, 2019 player side player sidejoined work great on script client side, I need a server side check in order to fix some script that were using the method iskindof 'soldierEB' but really I can't believe that great mod like those have their base config for MEN using wrong parents. Share this post Link to post Share on other sites
davidoss 552 Posted January 17, 2019 Really i do not understand what your problem are. Maybe this can help: _sideJoined = sideUnknown; _leader = leader _team; switch (getNumber (configFile >> "CfgVehicles" >> typeOf _leader >> "side")) do { case 0: {_sideJoined = east}; case 1: {_sideJoined = west}; case 2: {_sideJoined = independent}; case 3: {_sideJoined = civilian}; default {}; }; Share this post Link to post Share on other sites
rubberkite 19 Posted January 17, 2019 yes this could help I can test it, I would not have any problem if the config of the unit were done using the proper parent class, :) Share this post Link to post Share on other sites
davidoss 552 Posted January 17, 2019 Yes me too but unfortunately the world isn't like we wish. Anyway just simple side _team gives you group side of the player everywhere, which makes me confused about your 22 minutes ago, rubberkite said: I need a server side check... Share this post Link to post Share on other sites
rubberkite 19 Posted January 17, 2019 The player side it's ok I was already using a different approach but unfortunately I have still those check in other scripts: Quote if (side _origin == sideEnemy) then { if (_origin isKindOf westSoldierBaseClass) then {_side = west}; if (_origin isKindOf eastSoldierBaseClass) then {_side = east}; } else { _side = side _origin; }; if (_sideBuilding == _side) then { _dammages = false; } else { _dammages = [_building, _dammages] Call HandleBuildingDamage; }; _dammages Quote //--- Renegade. if (_sideKiller == sideEnemy) then { if (_killer isKindOf westSoldierBaseClass) then {_sideKiller = west}; if (_killer isKindOf eastSoldierBaseClass) then {_sideKiller = east}; }; if (_sideVictim == sideEnemy) then { if (_killed isKindOf westSoldierBaseClass) then {_sideVictim = west}; if (_killed isKindOf eastSoldierBaseClass) then {_sideVictim = east}; }; that's why I am looking for a way to replace this code with a different one, still have more script that use the west/east soldierbase class Share this post Link to post Share on other sites
killzone_kid 1330 Posted January 17, 2019 Do CUP and RHS have sides screwed up as well, as in hint str getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "side") correct values 0-opfor, 1-blufor, 2-resistance, 3-civilian Share this post Link to post Share on other sites
rubberkite 19 Posted January 18, 2019 Side are correct, otherwise units would be useless, thanks for trying to help, much appreciated :) Share this post Link to post Share on other sites