Petko 10 Posted March 21, 2011 I'm using a script command "unit setHit ["legs", 1];" to make a unit hurt on the leg and force him to prone (like someone is shot on the leg). But with this command only the groaning and red tinting of screen is happening, the character can still run around. No ACE or BIS_AIS module is enable, just pure basic mission. Is this command bugged? Or the leg bodypart? Then how can I achive the thing which happens when someone is leg shot? Share this post Link to post Share on other sites
Tankbuster 1747 Posted March 21, 2011 I've had loads of trouble with sethit too. Some of the names are in Czech, they aren't all the same across vehicles (the helicopters use different name for hull), some of the hits aren't named at all and some don't actually work. So, yes, it's bugged. Welcome to the giddy world of being a BI customer. Share this post Link to post Share on other sites
Petko 10 Posted March 21, 2011 yes i checked that translation list too and used the Czech variants for leg, legs etc., but they dont work... "legs" may be correct because of the pain effect it seems to do something (Czech "nohy" doesnt have pain effect), but it doesnt affect the movement at all Share this post Link to post Share on other sites
Bon 12 Posted March 21, 2011 Can't confirm this, works quite well for me - the unit I apply the 'sethit ["legs",1]' cannot run anymore, only prone. And that includes the player unit as well as AI. Even though its just the call of this simple command, I think it would be better to (for the first) assume you missed something rather than call the command bugged. Tell us how you use this command in particular. Share this post Link to post Share on other sites
Tankbuster 1747 Posted March 21, 2011 It's possible you didn't damage the legs enough to make him go prone? Share this post Link to post Share on other sites
Petko 10 Posted March 21, 2011 (edited) "1" means 100% as i know. Im testing now if the problem is with the unit class. It was a "US_Pilot_Light_EP1", but after changing it still does not work with a "US_Soldier_EP1" I will try it out within an empty mission. ----------- UPDATE: Thanks, now i found out the problem. There was a loop running setdamage for this same unit. It seems setdamage overrides the sethit somehow, and heals the legs. (As i know it shouldnt because the overall damage is independent from the bodypart) Edited March 21, 2011 by Petko Share this post Link to post Share on other sites
.kju 3245 Posted March 21, 2011 setDamage distributes the damage level to all subparts Share this post Link to post Share on other sites
Bon 12 Posted March 21, 2011 Thanks, now i found out the problem. There was a loop running setdamage for this same unit. It seems setdamage overrides the sethit somehow, and heals the legs. (As i know it shouldnt because the overall damage is independent from the bodypart) Afaik, the "" (overall) bodypart has only one purpose: that you can eventually die by hits in hands and legs. It is automatically increased according to hits in other bodyparts, i.e. legs, hands, body and head. So by receiving more and more damage on hands and legs (which is not lethal), you automatically receive damage on "" (overall), too, which, in fact, is lethal. The setDamage command actually has nothing to do with the "" (overall) bodypart, instead, it applies damage globally, on all bodyparts. And this also means overriding existing damage. Share this post Link to post Share on other sites
Petko 10 Posted March 21, 2011 Thank you, I can see clearer now... the next question would be, what does getDammage read then? Share this post Link to post Share on other sites
Bon 12 Posted March 21, 2011 Thank you, I can see clearer now... the next question would be, what does getDammage read then? Good question. I always explained it to myself that setdamage (damage, getdamage resp.) has its own imagination of hurting someone. So far, I couldn't observe anything contradictory to this thesis :p Share this post Link to post Share on other sites
celery 8 Posted March 21, 2011 (edited) Thank you, I can see clearer now... the next question would be, what does getDammage read then? The "" part is what getDamage returns. As a side note, damage to "body" and "head_hit" are lethal after going over 0.9. Edited March 21, 2011 by Celery Share this post Link to post Share on other sites
Petko 10 Posted March 21, 2011 The "" part is what getDamage returns. I tested it, but it doesnt seem so. If I sethit ["", x], getdammage unit outputs 0. (it should be x). sethit ["", 1]; doesnt kill. Share this post Link to post Share on other sites
.kju 3245 Posted March 21, 2011 "" means only no selection found. There is subparts (head, body,arms, legs) plus overall unit damage/health. Head, body or overall > 0.9 are lethal. Share this post Link to post Share on other sites
celery 8 Posted March 21, 2011 I tested it, but it doesnt seem so.If I sethit ["", x], getdammage unit outputs 0. (it should be x). sethit ["", 1]; doesnt kill. That's strange. I could have sworn that setHit worked with "" a few versions back but now it does nothing. BIS changed it? :( In any case, when "" is damaged and damage to other parts is prevented with HandleDamage EH, getDamage returns ""'s damage. Share this post Link to post Share on other sites