Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Injured  (Read 2378 times)

0 Members and 1 Guest are viewing this topic.

FltSgt

  • Guest
Injured
« on: 27 Aug 2002, 14:15:18 »
Can somebody make a script that make soldiers more injured when they are hit? So that either they can't run, move at all, shoot or they just lie on the ground twitching.

Offline Gastovski

  • Members
  • *
  • #loop; Gastovski setdammage 0; ~0.01; goto "loop";
    • Falklands Mod
Re:Injured
« Reply #1 on: 27 Aug 2002, 22:03:04 »
You could do it with an addon, but I don't know if you can stop AI moving... You could switchmove to "lyingtomedic" (or something) so they perform a action. I will come back and write a script after dinner...

Offline Gastovski

  • Members
  • *
  • #loop; Gastovski setdammage 0; ~0.01; goto "loop";
    • Falklands Mod
Re:Injured
« Reply #2 on: 27 Aug 2002, 22:43:30 »
OK here goes...

Code: [Select]
_soldier = ap1
#loop
_soldier switchmove "normal"
_dammage = getdammage _soldier
?_dammage = 0.7:goto "nomove"
~0.01
goto "loop"

#nomove
_soldier switchmove "whatevertheanimationis"
_soldier stop true

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

Should work... I can't test it though...

Marsuitor

  • Guest
Re:Injured
« Reply #3 on: 28 Aug 2002, 01:58:04 »
I couldn't get it to work. I changed "whateveranimation" to "lyingtomedic" and added the script to a soldiers init line.

Got an error message saying this,
'_damage |#|=0.7':Error unknown operator
(The "|" could be a "[")

The scripted soldier just stood there and didn't fall when i shot him. It still counted as a kill, though.
Could it be "lyingtomedic" that's spelled wrong? ???

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Injured
« Reply #4 on: 28 Aug 2002, 08:27:00 »
try this

_soldier = ap1
#loop
_soldier switchmove "normal"
_dammage = getdammage _soldier
?_dammage == 0.7:goto "nomove"
~0.01
goto "loop"

#nomove
_soldier switchmove "whatevertheanimationis"
_soldier stop true

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

FltSgt

  • Guest
Re:Injured
« Reply #5 on: 28 Aug 2002, 21:23:03 »
Thanks for that lads.

Offline Gastovski

  • Members
  • *
  • #loop; Gastovski setdammage 0; ~0.01; goto "loop";
    • Falklands Mod
Re:Injured
« Reply #6 on: 29 Aug 2002, 02:10:19 »
oops forgot the two equals... ==

cheers black_feather...