ID:179637
 
How could i make it so when you walk on a hill you slow down
Then when you walk off of it your speed goes back to what it was. This is what i have
turf
Hills
icon ='Hills.dmi'
Enter()
usr.speed=5
Then i dont know what to put if they leave the hill to make there speed go back to normal
Use initial()... of course, this won't do well if you do any other speed changes. Then you'd have to keep track of his speed when you change it.

I'll assume you're doing no other changes.
turf
Hill
icon = 'hill.dmi'
Entered()
speed = 5
Exited()
speed = initial(speed) //when they leave the hill, set their speed back to normal

In response to Vortezz
Slight problem with your code: You changed the hill's speed, not the user's.
turf
Hill
icon = 'hill.dmi'
Entered(mob/M)
M.speed = 5
Exited(mob/M)
M.speed = initial(M.speed)

Lummox JR
In response to Lummox JR
Lummox JR wrote:
Slight problem with your code: You changed the hill's speed, not the user's.

Heh. Thanks for pointing that out.

I've been kind of wonky with Enter(ed)() and Bump() and whatnot as of late.
In response to Vortezz

I've been kind of wonky with Enter(ed)() and Bump() and whatnot</b< as of late.

I never knew whatnot was one word...

-Sariat
In response to Sariat
I never knew whatnot was one word...

Now you do!

From m-w.com:

Main Entry: 1what·not
Pronunciation: 'hwät-"nät, 'wät-, '(h)w&t-
Function: pronoun
Etymology: what not?
Date: 1540
: any of various other things that might also be mentioned <paper clips, pins, and whatnot>
In response to Lummox JR
Might want an if(ismob(M)) in there too, otherwise you could get errors if any self-moving objs found their way into the mountains.