sabot10.5mm 47 Posted June 8, 2016 i have a script here that checks if a player is connected to an object named uav, but instead of checking one; how can i make it check 2 or more object? sort of like [uav, uav1]. i already tried this it didnt work, it said generic error. ((player == UAVControl uav select 0) && (isplayer _x) && (uav in thisList))} count allUnits > 0";};}; Share this post Link to post Share on other sites
jshock 513 Posted June 8, 2016 Untested, but maybe something like this: {_player = _x; {(_player == UAVControl (_x select 0)) && (_x in thisList)} count [uav,uav1] > 0} count allPlayers > 0 Share this post Link to post Share on other sites
sabot10.5mm 47 Posted June 8, 2016 unfortunately it did not work. no errors shown Share this post Link to post Share on other sites
jshock 513 Posted June 8, 2016 Try this: {_player = _x; {getConnectedUAV _player == _x} count [uav,uav1] > 0} count allPlayers > 0 Share this post Link to post Share on other sites
kylania 568 Posted June 8, 2016 Why not just use: _myConnectedUAV = getConnectedUAV player; And compare _myConnectedUAV to your list if you need to see if it's one of those. Share this post Link to post Share on other sites
jshock 513 Posted June 8, 2016 Why not just use: _myConnectedUAV = getConnectedUAV player; And compare _myConnectedUAV to your list if you need to see if it's one of those. Just saw those commands :). Share this post Link to post Share on other sites
sabot10.5mm 47 Posted June 9, 2016 Why not just use: _myConnectedUAV = getConnectedUAV player; And compare _myConnectedUAV to your list if you need to see if it's one of those. I'm not very good at writing code so could you help me out by showing me how do it Share this post Link to post Share on other sites
kylania 568 Posted June 9, 2016 jshock's example was pretty good for checking if any players are currently connected to uav or uav1 as written. Share this post Link to post Share on other sites