'Hurt' Entity

I was wondering if someone could make a simple SENT that just looks like a random small default prop (like the c17_doll or skull…) which will do minor (5?) damage when it touches a player.

But What Could It Be Used For?
-To attach to things like spinning saws, spiked attachments etc. Currently they do no damage to players, just push them away, so weld this SENT on, make it invisible and voila!

I’d suggest making an entity sawblade that does this if it’s spinning of something.

Scrounging the Gmod Lua Wiki, I’ve managed to make a simple sawblade entity that hurts on touch and plays a saw sound. However, does anyone know of a way to tell if the entity is rotating?

[lua]local phys = ent:GetPhysicsObject();
if phys:GetAngleVelocity():Length() > 0 then
//object is spinning.
end[/lua]

[editline]09:32AM[/editline]

Or

[lua]local phys = ent:GetPhysicsObject();
if phys:GetAngleVelocity().z > 0 then
//object is spinning around the z axis (yaw i think).
end[/lua]

Thanks, that worked atreat! I suppose this thread should be moved to Help and no longer requests as they are not working outside of singelplayer.

…I uploaded them to my server, but everytime I join the server says it has to send me the files again - and then they dont show up in the Entities spawnlist.