jcae2798 132 Posted June 30, 2015 I'm needing some guidance/help. I'm no expert to when it comes to scripting, but have been working on a mix of scripts that i am putting together for a mission design i hope to release soon. Anyways, What i am trying to do is the following: There is going to be 1 Array with a list of available CARs selected at random. From that selected One, i then want to compare if this one exists in a second array. I'll then be using a If THEN ELSE code. So example: _possible = ["CAR1","CAR2","CAR3"]; _EXECLUDE = ["CAR1","CAR2"]; _randomcar = _possible select (floor random count _possible); If (_randomcar != _EXECLUDE) then {CODE} } else { CODE}; Of course i know there is a few issues with the above example. I also tried: If (_randomcar != "car1" OR "car2") then But this didnt work either. So yea i'm stuck. Any help would be appreciated. Share this post Link to post Share on other sites
jshock 513 Posted June 30, 2015 if !(_randomcar in _EXCLUDE) then {}; Share this post Link to post Share on other sites
jcae2798 132 Posted June 30, 2015 Wow...LMAO. Thanks JShock, you're awesome ;) Cant believe it was that simple :) Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted June 30, 2015 You could also do _possible = _possible - _EXECLUDE and skip the condition entirely. Share this post Link to post Share on other sites
jcae2798 132 Posted July 1, 2015 You could also do _possible = _possible - _EXECLUDE and skip the condition entirely. Thanks for the tip. Code above worked great. Thanks guys Share this post Link to post Share on other sites