Thanks for your help, this was excetly what i was looking for but it didn't work though.. prob my fault..
First thing:
Basicly i am using the toggle thing to see which player is suppose to act.. i start out having a global variable "turn" = 0. Then when team 0 (red) acts it toggles the "turn" variable to 1 (blue). Then it goes like this back and forth.. Anyway when i used 0 ? 1 : 0 it always game me 1.. dont understand why.. tried to have it the other way 1 ? 0 : 1, then it went the other way.. always 0..
The other thing:
The number is between thing worked out fine. But the way i'm trying to use it doesnt work.
I am using the physic behaviour and when the velocity is between -1 and 1 i want the velocity to be 0, just stopped. I'm trying to do this because the round is over when all the items are stopped but it takes soooo long for it to reach from 1 to 0.. or -1 to 0.. I cant figure out any other way.. but if i try to force it this way the items dont move but few pixels..
[edit]
I just another way to deal with the first thing but there must be a easier way..
I set a variable Enemy on the items and set it to the enemys number.
So red items(0) and the enemey variable 1 and blue(1) had the enemy varable 0.
So when the turn was over i set the global variable "turn" to the items enemys variable.
That worked but rather bad fix, i want to use the toggle thing