ID:167502
 
How would I code a mob going into the water and then it changes into like the mob swimming. I imagine it would be something like...

mob
Enter()
water
icon='water.dmi'
swimming
icon='swimming.dmi'

but it's probebely wrong and I also want it so when you exit the water you get your walking back.

~Bamrulez
First of all, Enter() is not used for teleporting, changing icon states, etc. It's plainly to see if the atom is allowed to pass or not.
Anyway
turf/water
Enter(mob/M) if(istype(M)) return 1 // Let the mob pass
Entered(mob/M) if(istype(M)) M.icon_state="swimming"
Exited(mob/M) if(itype(M)) M.icon_state=""