ID:263106
 
Code:
    Door
icon='Turfs.dmi'
icon_state="Door"
density=1
Bump()
icon_state="Door_Open"
density=0
sleep(10)
icon_state="Door"


Problem description:it says Bump() is an underfined proc but isnt Bump() the corect form?I recall that it is,so whats the problem?

Bump() is called for the bumper, not the bumpee. As such, a turf cannot move, and cannot bump, so naturally does not have a Bump() proc. You will probably want to move that under mob/Bump() or something similar, check the passed argument for the door's type, and then run that code. You could also define your own Bumped() proc, if you wanted to.
In response to DarkCampainger (#1)
how would i make it so,if the player bumps it it does that?
In response to Dragon_fire6653 (#2)
Dragon_fire6653 wrote:
how would i make it so,if the player bumps it it does that?

Well, if you want to take the Bumped() suggestion, you do something like this: (Read the comments, they're the only educational part of this.)
atom/proc/Bumped() //Define the Bumped() process for all atoms, so we can call it with almost anything.

mob
Bump(atom/A) //When a mob bumps into something...
A.Bumped(src) //Call that something's Bumped() process, passing the mob as an argument so it knows what bumped it.
..() //Do whatever else Bump() should be doing


turf
Door
icon='Turfs.dmi'
icon_state="Door"
density=1
Bumped(mob/M) //When something bumps into this door...
if(istype(M,/mob)) //Make sure it is a mob. Although right now only mobs can call the Bumped() process, you might later decide to extend it to all movable atoms, so it's better to be on the safe side
icon_state="Door_Open" //Open the door!
density=0
sleep(10)
icon_state="Door"