ID:1818474
 
(See the best response by Kaiochao.)
Code:
Spearguard
density=0
icon='Paperguard.dmi'
icon_state="1stay"
New()
..()
flick("1",src)
Del()
flick("1del",src)
..()
Enter()
flick("1",src)
usr<<"You run into the Spearguard and are impaled!"
usr.DamageProc(75,"Health",src.Owner)
usr.Bloody()
return


Problem description:

This basically is supposed to damage whoever it hits if they run into it. Enter is probably not the proc I'm supposed to use here, but I'm not sure. It's an object, so I assume thats why Enter wouldn't work, even when I made the object not dense and Enter() caused a return at the end of it. Should I make the object dense, and if so, which proc should I call to utilize these effects?

You can leave the object non-dense and use the Crossed() event.
// indent as appropriate
Crossed(atom/movable/M)
// src is the Spearguard,
// M is the object that stepped on src.
// Since Crossed() can happen for any /atom/movable,
// but we only want to damage mobs,
// we need to check for mobs.
if(ismob(M))
var mob/m = M
flick("1", src)
m << "You run into the Spearguard and are impaled!"
m.DamageProc(75, "Health", Owner)
m.Bloody()

Enter() doesn't work because objects stepping over src aren't entering src's contents, like an item object might for a player. Enter() and Cross() are also not suitable because they aren't meant for effects, they're just checked to see if the movement is allowed to happen.
Well, it's supposed to be dense, and not allow them to walk over it. It's supposed to impale someone when they run into it, not impale them when they step on it. :c
In response to Apophis0
Best response
In that case, make it dense and use Bump().

To make it easier, you can use these definitions:
atom
// src was bumped into, by Bumper
proc/Bumped(atom/movable/Bumper)
// by default, it does nothing

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

This lets us stay working inside Spearguard.
    Spearguard
density = TRUE
// etc.

Bumped(atom/movable/M)
// same as what I had for Crossed()