Author Topic: Change damage received to different body parts in a playertype?  (Read 1137 times)

What is the repair rate for a normal player?
Solved

I'll reuse the topic for my other question-


Is there anyway to change how much damage a player receives, but only for one part of the player like the torso?
« Last Edit: January 01, 2010, 02:23:09 AM by Block Builder »


Try using hitboxes. Just use the attached script and the getHitbox(player, projectile, position) function which returns a list of nodes that would have been colored if a paint can projectile had hit the player at the position entered.



Try using hitboxes. Just use the attached script and the getHitbox(player, projectile, position) function which returns a list of nodes that would have been colored if a paint can projectile had hit the player at the position entered.
Don't throw scripts at people and expect them to know what to do with it.
Even I don't know what the forget to do with it.

Don't throw scripts at people and expect them to know what to do with it.
Even I don't know what the forget to do with it.

Coding Help has a number of mottos and rules of thumb that vary from person to person.

Generally the majority try not to hand everything to you on a silver platter.
If you need a specific level of script you need to specifically ask for it.

Also you don't know what "the forget" to do with it because (I can only assume, and the assumption should be taken lightly at that) of your own incompetence.



Anyways, this is as close as I will touch this one right now.
Code: [Select]
if(getword(%pos, 2) > getword(%col.getWorldBoxCenter(), 2) - 3.3){

As I sit here I realize that I've never really tested this to see if it actually works(as in, it compiles but I've never extensively tested it in all my years), but that's my usual line of code for detecting headshots, given the projectile::oncollision. Is the projectile's position(Z of %pos) above a certain position on the player (Z of %col.getworldboxcenter())?

You could adapt this for feet, is it below a certain position. Getting arms would be difficult with this code but you could probably find a way.

Maybe you can adapt it or confirm/disprove it's effectiveness.


Look; I don't know whether or not this will help, but I think we can all agree that MtnDew isn't contributing in a useful manner.

Coding Help has a number of mottos and rules of thumb that vary from person to person.

Generally the majority try not to hand everything to you on a silver platter.
If you need a specific level of script you need to specifically ask for it.

Also you don't know what "the forget" to do with it because
(I can only assume, and the assumption should be taken lightly at that) of your own incompetence.

-pointlesssnip-

Well, I would not consider you a scripter-- that is, what the forget are you doing in the coding help forums and why the forget do you expect it to be understandable.

-Snip-

That doesn't help at all since I need the torso to take 50% of damage it receives. It may work for head shots, but if I can figure out the torso thing than I'll use that fr head shots.

Change that ">" to a "<", then.

Although his code won't work for scaled up/down players.

Although his code won't work for scaled up/down players.
Blast! foiled again!

That doesn't help at all since I need the torso to take 50% of damage it receives. It may work for head shots, but if I can figure out the torso thing than I'll use that fr head shots.
As I have stated about the silver platter rule of thumb, try to use what you get regardless of whether or not it instantly fixes your problem and creates peace in the universe.

-snip-

Well if I don't know how to do it, what the hell makes you think I'll know how to do it later?

Well if I don't know how to do it, what the hell makes you think I'll know how to do it later?

You could attempt to understand the code. It would be relatively easy to check for torso hits using that(You only, after all, have to change one character, see space guy's comment)



Also I should note that it is easier to make non-torso hits do more damage than make the torso take less damage.

Well I'm stupid. :C

But I guess I could double the health and make everything except torso receive twice as much damage.