ID:148414
 
atom
proc/Bumped(atom/movable/A)

movable/Bump(atom/A)
A.Bumped(src)
turf/any_turf_with_a_density_of_1
name = ""
icon = 'turf.dmi'
density = 1
Bumped(atom/movable/A)
A<< 'bump.wav'

//all my other dense turfs are similar
This is my dense things bump thing =) well whenever you bump a dense defined turf or obj, it should make the bump sound. But, it doesnt work when i have this...

mob
Bump(var/atom/O)//when you bumb an obj mob or turf
if(istype(O,/mob))//if its a mob
var/mob/M = O//mob/M=O
if(!M.client)//if its an NPC
if(M.pushold == 1)//if its a pushable old person
if(src.chill == 1)
src<< sound('bump.wav')
if(step(M,dir)) step(src,dir) //it moves the direction you bump it and faces the direction your facing
src.irritated = 1//that makes it mad! aka says something different
src.chill = 0
return 1//OK!
if(src.chill == 0)
sleep(1)
src.chill = 1
else//if its not an NPC
return 0// no cookie for you


any idea why these 2 thing are in confrontation with eachother? If you can help, I'd be greatly appreciative.

ETG
Because you're returning from the modified Bump() without calling ..(), the version that calls Bump() is never called, so nothing comes of it.

I assume the "return 1" line after a successful push is right, except for the 1 because it's useless. That is, I assume you don't want to make the sound so you don't call ..(). The "else return 0" at the end is definitely counter-productive, though, so just rip that right out.

Now, as the last line in the proc, indented only as far as the very first if(), put in:
..()

Lummox JR
In response to Lummox JR
atom
proc/Bumped(atom/movable/A)

movable/Bump(atom/A)
A.Bumped(src)

turf
stone
name = ""
icon = 'stone.dmi'
density = 1
Bumped(atom/movable/A)
A<< 'bump.wav'

And how could i slow down the sound effect? when you run into a dense object, the sound effect gets called so fast
its quite annoying. Can anyone help me out? I fiddled around with sleep but i couldnt come to anything.
In response to Erdrickthegreat2
atom/movable/var/atom/lastBumped

turf
denseturf
Bumped(atom/movable/A)
if(lastBumped != src)
A << sound()
In response to Garthor
atom
proc/Bumped(atom/movable/A)

movable/Bump(atom/A)
A.Bumped(src)

atom/movable/var/atom/lastBumped

turf
plant
name = ""
icon = 'plant.dmi'
density = 1
Bumped(atom/movable/A)
if(lastBumped != src)
A<< 'bump.wav'
Garthor it didnt work, said lastBumped wasn't defined
Did i add it wrong?
In response to Erdrickthegreat2
if(lastBumped != src)

Oops, A.lastBumped, not lastBumped
In response to Garthor
whats this supposed to do? because it doesnt break up each sound like what i was going for, do you know how i could achieve this?

ETG
In response to Erdrickthegreat2
Gah, I can't concentrate. You also need A.lastBumped = src in there.
In response to Garthor
heh get some sleep garthor, and thanx a lot for your help