Other than Actor being capitalized after the if check (which it shouldn't be), it might be because the check isn't getting the actor. Distance is to the center of the actors torso, so if you shoot him in the face or another extremity, it might not reach him, though a shot in the torso would kill any vanilla actor. The code seems functional, so try fixing the capital A first. We all know how rigid CC is about capital letters.
If you want it to work on bigger actors you can change this
Code:
if dist < 10 then
to
Code:
if dist < actor.Diameter*2 then
You might want multiply it by 2.5 or 3 instead
Sun Jan 30, 2011 9:57 am
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
Re: Instant dead actor script.
It'd probably be easier to use something like a ray check based on velocity and a findrootmo. That way you'd make it more reliable and also able to work on large actors without oddness cropping up. You can balance it out with additional conditions from there, if you please.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum