Jump to content
Sign in to follow this  
killerwhale

Array problem

Recommended Posts

Hi, this is my script below, im not sure what i'm doing wrong but it only works on them individually ( like if i replace knowsAbout _snipers with knowsAbout S1) and not the entire array.

my question is, can't E1 know about the entire "_snipers" array? plz help

#loop

_snipers = [s1,S2]

if(E1 knowsabout _snipers > 0.1)then{hint"they are here";}else{hint" they are not here";};

~1

goto"loop"

Share this post


Link to post
Share on other sites

You could try something like this maybe. Not tested.

Private "_Snipers";
_snipers = [s1,S2,S3,S4,S5,S6,S7,S8,S9,S10];

While {True} Do

{


      {

          If ((Alive _x) && (E1 KnowsAbout _x > 0.5)) Then 

         {
           Hint Format ["%1 Knows About %2", Name E1, Name _x];
         } 

       Else 

         {
           Hint Format ["%1 Knows nothing about %2 or %2 is dead", Name E1, Name _x]
         };

          sleep 2;

      } ForEach _Snipers;



};

Edited by Iceman77

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×