ID:178751
 
i got alot of questions. First off say you want to make it so when you log in you get to chose a team of blue or red. How would you accomplish this? And if you have a var called moves but you only want the blue team to move something once and var moves increases. How would you make it so after you move once its red's turn? And last thing i have icon states for two objs. There is a blue and red statue. Is there a way to make it so you can only move your color statue? I know these are alot of questions but i would appreciate it if you help me out.
>First off say you want to make it so when you log in you get to chose a team of blue or red.

Use an input() inside of an switch().

switch(input("What team do you want?") in list("Red","Blue"))
if("Red") // do red stuff
if("Blue") // do blue stuff

>How would you make it so after you move once its red's turn?

Make a variable that decides whether players on each team can move or not. If the variable is 1, red team can move, if it is 2, blue team can move.

>And last thing i have icon states for two objs. There is a blue and red statue. Is there a way to make it so you can only move your color statue?

Just check to see if the icon_state of the statue is equal to the mover's team variable. So, if icon_state = "Red" and mover.team = "Red", move the statue. If not, don't move it.
In response to Foomer
How would you make a world var so it does it to everyones var to 1
In response to Tazor07
Just make a variable that doesn't belong to anything, so it'd look like this:

var/team = 1

instead of:

mob/var/team = 1
In response to Foomer
if i use the if stateement such as if(BlueMove = 1) i get errors
In response to Tazor07
What does your code look like?
In response to Foomer
nm i figured it out thanks for the help foomer