This is not a strong point so forgive the explanation.
I have 10 objects of type .player but only the last 2 objects need to be referrenced in terms of human control,camera position etc.. Each object has a 'field' called 'human' which is used to identify whether the object is human controlled or cpu controlled. This can be -1(CPU), 0 = player1 or 1=player2.
In my program I have to constantly iterate through the type and only do something when var\human >-1. I've no doubt that there's a better way of doing this - can anyone help?
I have 10 objects of type .player but only the last 2 objects need to be referrenced in terms of human control,camera position etc.. Each object has a 'field' called 'human' which is used to identify whether the object is human controlled or cpu controlled. This can be -1(CPU), 0 = player1 or 1=player2.
In my program I have to constantly iterate through the type and only do something when var\human >-1. I've no doubt that there's a better way of doing this - can anyone help?