ID:148361
![]() Mar 17 2003, 3:52 pm
|
|
I have made a swimming code and when you decide to swim your density goes to 0 and when you stop it goes to 1 again. Now the problem is to get it so that the player doesnt just walk over everything. I need it so that when he tries to stop swimming or leave the water for it to set his density back to one. Help would be appreciated.
|
![]() Mar 17 2003, 4:01 pm
|
|
turf
water icon = 'water.dmi' Entered(mob/M) if(ismob(M)) if(M.client) M.density = 0 M.icon_state = "swim" Exited(mob/M) if(ismob(M)) if(M.client) M.density = 1 M.icon_state = "" Siientx |
Actually changing density is a much worse solution than simply changing Enter() to allow swimmers. In fact, the best possible solution is to make water non-dense, but make Enter() disallow any non-swimmers from entering the water.
Lummox JR |
Lummox, the only problem im having is with the Enter() part of the code. whenever i compile it says Inconsistent Indention for all the lines. I've tried to fix this as much as i can but still no luck. Any ideas??
|