Jump to content
Sign in to follow this  
nephilim

How to detect wich part of a soldiers body

Recommended Posts

Any ideas?

i knoe theres been a headshot script out that checks if a unit has been hit in its head

so basically is it possible??

like if u hit a units left hip; or right arm a hint gets actiaveted

thx fo any help

cheerio

Share this post


Link to post
Share on other sites

I think the dammaged eventhandler returns the selection a person is hit in, but its in czech, and I dont know what stands for what tounge_o.gif

Share this post


Link to post
Share on other sites

great!

but er

can anyone give me a small examaple maybe?

cuz i never heard of that dammaged eventhandler

thx

Share this post


Link to post
Share on other sites

well i foudn this on the ofpec

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"dammaged" (doesn't work for vehicles) :

_this select 0 : who's damaged;

_this select 1 : what part of the body has been hit ("nohy" for the legs, "ruce" for the hands, "hlava" for the head, "telo" for the torso).

_this select 2 : scalar damage value;

This EH does NOT return who has shot.

but how do i use it now?

hwo would the typical line look like?

i know this

dude AddEventHandler ["killed", { exec kickass.sqs}]

how woudl this look like for body parts?

Share this post


Link to post
Share on other sites

dude AddEventHandler ["dammaged", {_this exec "kickass.sqs"}]

RED

Share this post


Link to post
Share on other sites
Quote[/b] ]nohy" for the legs, "ruce" for the hands, "hlava" for the head, "telo" for the torso

actually it is in russian biggrin_o.giftounge_o.gif

It is fantastic! shame i didnt know about it before sad_o.gif

now someone can make proper animations for body parts smile_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]dude AddEventHandler ["dammaged", {_this exec "kickass.sqs"}]

well i know this biggrin_o.gif

sorry havent been precised enough?

wot shall i write in the script for example so that id the legs are hit sth get activated

im not the brightest in scripting

thx anyway

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

;kickass.sqs

?(_this select 1) == "nohy" : (_this select 0) sidechat "AIIE MY LEGS!"

Share this post


Link to post
Share on other sites

ok thx

but one more question

can i use any selection? (custom or similar)

like the one used by the soldier model or have it to stick with the ones that are listed above?

Share this post


Link to post
Share on other sites

ok i think i sorted it out

oen more question

are multiplequestion possible like

?(_this select 1) == "nohy" and

?(_this select 2) == "hlava"

cheers

Share this post


Link to post
Share on other sites

The question doesn't really make sense.

_this select 0 : who's damaged;

_this select 1 : what part of the body has been hit ("nohy" for the legs, "ruce" for the hands, "hlava" for the head, "telo" for the torso).

_this select 2 : scalar damage value;

In the script you can do whatever you like with the values returned. _this select 1 could be nohy or ruce or whatever: _this select 2 is going to be a number between 0 and 1. (I presume)

But you could certainly have

?(_this select 1) == "nohy" : goto "leg"

?(_this select 1) == "hlava" : goto "head"

Share this post


Link to post
Share on other sites

just found it again, sorry for digging it up, but i wanted to ask if it now possible and if there's a working script for it?

would be really great if someone could send me, please

i'd be mainly interested in detecting on which body part a soldier got hit.

mfg

Tom

Share this post


Link to post
Share on other sites
just found it again, sorry for digging it up, but i wanted to ask if it now possible and if there's a working script for it?

would be really great if someone could send me, please

i'd be mainly interested in detecting on which body part a soldier got hit.

mfg

Tom

Try FML human dammage system (alpha version) at Farmland Topic I've released it some days ago and has this feature you want tounge_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×