Home   Help Search Login Register  

Author Topic: Setdammage on a specific spot  (Read 428 times)

0 Members and 4 Guests are viewing this topic.

NoFear

  • Guest
Setdammage on a specific spot
« on: 15 Apr 2003, 14:02:51 »
Ok, Ive making a mission whit some pows that you should rescue.When you get near them Ive made a guard hit a pow whit his rifle whit the action command, then i want the pow to start bleeding from the head, is that possible? ??? I want it realistic, because if i get hit in the head, my toes dont start bleeding.... I appriciate all help (Most working)
« Last Edit: 15 Apr 2003, 14:03:22 by NoFear »

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Setdammage on a specific spot
« Reply #1 on: 15 Apr 2003, 15:50:40 »
 :) the "setDammage" command is the only damage you can use on units: all specific damage (i.e. head region) is specified as percentage relative to the overall "setDammage", defined in the unit's configuration file.

Nevertheless, I believe (not sure, haven't tried it) that with some fiddling with the detection of bullets you may be able to specify a region if is it possible to sort of invert the.... bah! forget it!  ::)


NoFear

  • Guest
Re:Setdammage on a specific spot
« Reply #2 on: 15 Apr 2003, 17:28:21 »
 :'(

Gameer_77

  • Guest
Re:Setdammage on a specific spot
« Reply #3 on: 15 Apr 2003, 18:01:16 »
Lol Tomb. ;D

[EDIT] Ah crap - you want to know how to set damage! God damn! Well, try camcreating bullets...I'm too lazy to type out how to do that. Someone else do it ;D

If you want a rough estimation of where someone is hit, add a 'dammaged' eventhandler. :)

In the eventhandler, when the person is damaged something happens (which you specify). An array is also made which contains the part of the model which was hit and by how much.

If you use a 'hint format' to find the name of the head section (by adding an eventhandler then shooting him in the head ;)) you can then detect it in a script or whatever.

Code: [Select]
this addeventhandler ["dammaged",{hint format ["Name of hit part: %1", (_this select 1)]}]
Put this in the init then shoot a guy to see the name of the fired part.

If you then use a script to detect it, you can see where he was hit. :)

Example:
Code: [Select]
this addeventhandler ["dammaged",{[_this] exec "nameofscript.sqs"
Then in nameofscript.sqs you put

Code: [Select]
?_this select 1==hlava:hint "hit in the head"
?_this select 1==ruce:hint "Hit in the head (2)"

I think there was two of them (hlava,ruce) so you'll have to test more.

This is untested, remember, and there are no doubt errors so look out ;D

Gameer
« Last Edit: 15 Apr 2003, 18:04:46 by Gameer »