ID:268567
 
obj/Smoke
icon = 'Bombs.dmi'
icon_state = "smoke"
layer = MOB_LAYER+1
Bump()
usr.sight |= BLIND

No errors, but, the user doesn't become... blinded. x_X
Could someone please tell me what I'm doing wrong?
obj/Smoke
icon = 'Bombs.dmi'
icon_state = "smoke"
layer = MOB_LAYER+1
Bump(atom/movable/A)
if(ismob(A))
var/mob/M = A
M.sight |= BLIND
In response to DeathAwaitsU
Hmm... still nothing...
In response to Hell Ramen
Well, first one dense object has to try and move into another dense object for Bump() to be called. Second, Bump() is called on the atom that failed movement. So if a dense /mob moves into a dense /obj/smoke, the mob's Bump() proc will be called.
In response to Jon88
=/
I changed it to the density of one, still nothing...
Yup, you're using this wrong.

First, usr has no business in there. Get rid of it.

Second, Bump() is called as moving_thing.Bump(obstacle). So defining Bump() for the smoke won't help you unless the smoke is what's moving.

Lummox JR
In response to Hell Ramen
Is the mob moving into the smoke, or the smoke into the mob? If it's the smoke that's moving, how do you move the smoke?
In response to Jon88
The mob is moving into the smoke. =/
In response to Hell Ramen
Mob moves into smoke.
Mob.Bump(smoke) is called.
Nothing happens.

A suggestion would be to implement a Bumped() procecure, like so:
atom/proc/Bumped(atom/A)

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


So whenever an atom tries to move into another dense atom, that dense atom's Bumped() procedure is called. You can then use /obj/smoke/Bumped() to do what you want.
If you don't completely understand, there are other forum posts on the subject that were written much better than mine. :)