ID:262655
 
Code:
turf
water
icon='scenery.dmi'
icon_state = "water"
Entered()
if(usr.waterwalk == 1)
density = 0
return..()
else
density=1
mob
verb
Water_Walk()
set category = "Commands"
usr << "You can walk on water now."
usr.waterwalk =1


Problem description:I cant even walk on the water even when i use the water_walk()
var/mob
waterwalk = 0


Several problems.

1. You're using the water-walking by modifying the density var.

2. You're using the wrong proc. Use Enter() as opposed to Entered(). Use return values instead of changing the density.

3-so on. Many others I don't feel like listing.

Something like:
turf
water
icon = 'scenery.dmi'
icon_state = "water"
density = 1
Enter(mob/M)
if(M.waterwalk)
return 1
return ..()

Should work better, I would think.

Hiead
In response to Hiead
Thx alot ^^
In response to Hiead
You're assuming what enters the water is a mob. What if a flying object fell in? Runtime errors.

~~> Dragon Lord
In response to Unknown Person
Then he'd check for density.
turf/Water
Enter(atom/M)
if(!M.density) return 1
if(ismob(M)&&M.WaterWalk) return 1
return ..()
In response to Unknown Person
You're right. I actually meant to include it with the original post, but I guess I forgot.

<dm>
turf
water
icon = 'scenery.dmi'
icon_state = "water"
density = 1
Enter(mob/M)
if(ismob(M)&&M.waterwalk)
return 1
return ..()

--- How it was meant to be written. If it's not a mob, then it just returns the default value based on such factors as density, etc.

Hiead