ID:263069
 
Code:
Enter(var/mob/M)
if(!M.boat)
if(alert("Do you want to go sailing","Boat","Yes","No")=="Yes")
for(var/turf/A in world)
if(istype(A,/turf/water/))
A.density=0
M.boat=1
M.icon='boats.dmi'
M.icon_state="ship"
M.overlays=0


Problem description:Ok when I Enter the typepath turf/water/ it brings up the pop up asking if i want to sail and when i click yes it chages my icon and all but the waters density remains 1 for some unknown reason why might this be?

National Guardsmen wrote:
Code:
> Enter(var/mob/M)
> if(!M.boat)
> if(alert("Do you want to go sailing","Boat","Yes","No")=="Yes")
> for(var/turf/A in world)
> if(istype(A,/turf/water/))
> A.density=0
> M.boat=1
> M.icon='boats.dmi'
> M.icon_state="ship"
> M.overlays=0
>

Problem description:Ok when I Enter the typepath turf/water/ it brings up the pop up asking if i want to sail and when i click yes it chages my icon and all but the waters density remains 1 for some unknown reason why might this be?


would it be smart to change the water's density to 0? then everyone can walk across the water, instead you should put a enter check on the water to see if your able to enter it.Hmm...
turf/water/Enter(mob/m)
if(ismob(m)&&m.boat).=1
else .=0
Not only should you not change the water's density, but you should also not use alert() here. If the player walks onto water they do so on purpose. Just make sure that 1) they're not already in a boat icon and 2) if not, to change it in Entered(). Be sure to use Exited() to change it back.

Lummox JR