Could this be replicated in CC? I'm thinking a bullet that detects if it's about to go into a head and spawn a lot more of itself so it does more damage. First off - would that work, realistically, and second off, how do I do it? I know the spawning bullets bit, but I have no idea how rays work, or at least very very little idea.

Hell, if someone could take five minutes (or more) to just fully explain rays to me that'd be awesome, since they're one thing I haven't gotten into at all. 4zk save the day?

Also: is there a way to make a weapon play a special sound everytime its drawn? Is that done just by using the when-created function?

Found out the first thing! Thanks 4zK!

Last edited by Hoovytaurus on Sat Jan 21, 2017 10:34 am, edited 1 time in total.

Fri Jan 20, 2017 3:06 pm

Pantera1993

Joined: Wed Jul 06, 2011 5:11 pmPosts: 222

Re: Deadbolt Headhunter - more damage on headshots

I know there's a damage multiplier that you can change in lua but I'm not exactly sure how you would use it to do what you want.

Here's the code from the gibdeathonly global script.

Code:

if IsAHuman(actor) then actor.DamageMultiplier = 0

local human = ToAHuman(actor) if human then if human.Head then human.Head.DamageMultiplier = 0 end if human.FGArm then human.FGArm.DamageMultiplier = 0 end if human.BGArm then human.BGArm.DamageMultiplier = 0 end if human.FGLeg then human.FGLeg.DamageMultiplier = 0 end if human.BGLeg then human.BGLeg.DamageMultiplier = 0 end end end

Fri Jan 20, 2017 6:49 pm

Hoovytaurus

Joined: Mon Dec 21, 2015 9:30 amPosts: 82

Re: Deadbolt Headhunter - more damage on headshots

Pantera1993 wrote:

I know there's a damage multiplier that you can change in lua but I'm not exactly sure how you would use it to do what you want.

Here's the code from the gibdeathonly global script.

Code:

if IsAHuman(actor) then actor.DamageMultiplier = 0

local human = ToAHuman(actor) if human then if human.Head then human.Head.DamageMultiplier = 0 end if human.FGArm then human.FGArm.DamageMultiplier = 0 end if human.BGArm then human.BGArm.DamageMultiplier = 0 end if human.FGLeg then human.FGLeg.DamageMultiplier = 0 end if human.BGLeg then human.BGLeg.DamageMultiplier = 0 end end end

That seems to be useful only to use after I've already detected an actor, which is still my main problem. Spawning more bullets just before impact will work fine for me, I just need to know how to tell CC what "just before impact" is.

Fri Jan 20, 2017 7:48 pm

Visage

Joined: Fri Jul 06, 2012 7:20 amPosts: 44

Re: Deadbolt Headhunter - more damage on headshots (SOLVED)

You should check out the lua for the Ronin RPG-7. It explodes when close to enemies/terrain, and it's pretty easy to cut terrain out of that calculation.

That code will give you the actor, but I'm not sure how hard it would be to find out if you're heading towards a head or not.

Who is online

Users browsing this forum: No registered users

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum