• Making blood decals "spray"? (place blood on a certain radius)
    4 replies, posted
Hey, guys. So, I've got this piece of code here: [lua]local startp = trace.HitPos local traceinfo = {start = startp, endpos = startp - Vector(0,0,50), filter = ent, mask = MASK_NPCWORLDSTATIC} local btrace = util.TraceLine(traceinfo) local Pos1 = btrace.HitPos + btrace.HitNormal local Pos2 = btrace.HitPos - btrace.HitNormal util.Decal("Blood", Pos1, Pos2) [/lua] The problem with this is, it only puts blood under the body and nowhere else. Can anyone tell me if there's a way to "spray" the blood around? Maybe using a radius check?
Desperate, one-week bump.
Maybe trace a line from through the NPC or whatever it is you're hitting and if the HitPos is within a certain distance place a decal on it.
um. I need to place multiple decals within a certain radius. You hit the ragdoll, it sprays blood all over the place. That's what I want.
I think in TTT dead body "bleeds" for some time. I'd look into that. Otherwise experiment with traces and random angles.
Sorry, you need to Log In to post a reply to this thread.