Home   Help Search Login Register  

Author Topic: hitparts bugs on arma  (Read 1474 times)

0 Members and 1 Guest are viewing this topic.

Offline cervantes

  • Members
  • *
hitparts bugs on arma
« on: 02 Aug 2010, 00:04:54 »
hi at ofpec community  :) i works a damaged script for check a hitpart damaged.

a hitpoint on p3d model works really bizare i join a movie for watch this strange bug.

for debuging a script i use hint format ["%1",_hitPart]

when i shot on body  a "hands" has returned and when i shot on the bottom of the head "body" has returned.

http://www.youtube.com/watch?v=4VOqVOUKhZ4

a damaged script working in damaged event handler

_zombie addEventHandler ["Dammaged", {_this exec "\farmland_zombies\hitpart.sqs"}];





hitpart.sqs//

_unit = _this select 0;
_hitPart = _this select 1;
_damm = _this select 2;


_red = [0.77,0.05,0.23,1];
_duration = 0.8;

hint format ["%1",_hitPart]


#check
? (_hitPart != "head_hit") : _unit addEventHandler["hit",{(_this select 0) setdamage -5}]; goto "exit";
? (_hitPart == "head_hit") : _unit removeEventHandler ["hit", 0]; goto "head";
goto "check"


#head
_unit setdamage 0;
head_shot=true;
_bloodpos = _unit modelToWorld [0,0,1.5];
_head = _unit modelToWorld [0,0,2];
drop[["\Ca\Data\ParticleEffects\Blood\Blood.p3d", 1, 0, 1], "", "Billboard", 1, _duration, _bloodpos, [0, 0, 0.75], 0, 10, 7.9, 0.075, [0.2, 0.6, 0.7], [[0.1, 0.1, 0.1, 30], [0.25, 0.25, 0.25, 0.5], [0.5, 0.5, 0.5, 0]], [0.08], 1, 0, "", "", XXXOBJECTXXX];
exit

#exit
;? (_hitPart == "body") or (_hitPart == "hands") or (_hitPart == "legs"): _unit setdamage -5;
head_shot=false;
_unit setdamage 0;
_critical = _unit modelToWorld [0,0,1.5];
?!alive _unit and (_hitPart != "head_hit"):_unit setdamage 1; drop[["\farmland_Zombies\brain\critical.p3d", 1, 0, 1], "", "Billboard", 1, 3, _critical, [0, 0, 0.75], 0, 10, 7.9, 0.075, [0.2, 0.6, 0.8], [[0.1, 0.1, 0.1, 30], [0.25, 0.25, 0.25, 0.5], [0.5, 0.5, 0.5, 0]], [0.08], 1, 0, "", "", XXXOBJECTXXX];
exit


some problems of hitparts

if hitpart no = "head_hit"

a unit d'ont get a damage with hit event handler a script working but when i shot on body "hands" has returned and a zombies dies when body has returned a zombies dies also a setdamage -5 work only on legs parts.

i have read a topic of hitpart script on the forum and a wolfrug body armor topic and d'ont understand how fix my script :dunno: .

any idea for fix this?


« Last Edit: 02 Aug 2010, 11:20:56 by cervantes »