Home   Help Search Login Register  

Author Topic: Help me with my injury script  (Read 490 times)

0 Members and 2 Guests are viewing this topic.

Cpl. Vagabond

  • Guest
Help me with my injury script
« on: 02 Apr 2003, 19:32:29 »
i'm trying to make a script in which once their injured the soldier(s) who are injured  assume the treated position and set catpive true, but they start to bleed and die slowly until a medic arrives and heals them.

injured.sqs
Quote
unit = ap1
#loop
unit setCaptive false
unit switchmove "normal"
_dammage = getdammage _unit
?_dammage == 0.7:goto "nomove"
~0.01
goto "loop"

#nomove
unit switchmove "LyingTotreatedLying"
unit stop true
unit setCaptive true
unit exec "bleed.sqs"

#loop2
_dammage = getdammage ap1
?_dammage == 0:goto "loop"
~0.01
goto "loop2"

bleed.sqs
Quote
_unit = _this select 0
#loop1
"KEGres_Misc033" createVehicle [(getpos _unit select 0)-0.01,(getpos _unit select 1)-0.001,(getpos _unit select 2)+0.001]
goto "loop"
#loop
@ getdammage _unit >0
_damage = (getdammage _unit)+0.00111111111111111111111111111111111111111111
_unit setdammage _damage
~1
goto "loop1"

#end
exit

i can't get the dam thing to work, i put it in the init.sqs as
[] exec "injured.sqs"

help please someone

and because the bleeding script isn't mine i don't know how to make the blood appear under your guy (instead of 2-5ft away) can someone help me with this aswell please

MorMel

  • Guest
Re:Help me with my injury script
« Reply #1 on: 03 Apr 2003, 11:42:25 »
Code: [Select]
?_dammage == 0.7:goto "nomove"

Humm... It's very hard to get 0.7 as the unit's dammage! The unit's dammage can change from 0.5 to 0.8 at once! Therefore you should change 'your' script and input:

Code: [Select]
?_dammage => 0.7:goto "nomove"

I think it will work fine!

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Help me with my injury script
« Reply #2 on: 03 Apr 2003, 14:07:04 »
beter 2 do it

@ getdammage _unit >= 0.7

instead of loop

less comp res used ;D

LCD OUT

"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Cpl. Vagabond

  • Guest
Re:Help me with my injury script
« Reply #3 on: 03 Apr 2003, 17:18:42 »
nope i can't get it to work and it's driving me NUTS!!!!!!!! can someone get this working for me plz, prefrabbly before i end up in a padded room.

thx in advance

Offline uiox

  • Contributing Member
  • **
Re:Help me with my injury script
« Reply #4 on: 03 Apr 2003, 18:21:25 »
The author of bleeding script is kegetys and you need the addon for create blood, kegetys has done this for blood in winter addon...

Cpl. Vagabond

  • Guest
Re:Help me with my injury script
« Reply #5 on: 03 Apr 2003, 18:30:03 »
I've got his addon, i've made the blood appear under the man but i just can't get the soldier to assume the treated position, my ultimate goal with this is the make it so i can just put one piece of scripting into the init.sqs so that everytime a man takes more than 60% damage he will be captive, bleed and be stuck until he is dragged away or a medic heals him to full.

if anyone can make this for me please post it here.

Regards
Cpl Vagabond