Home   Help Search Login Register  

Author Topic: melee attack  (Read 2458 times)

0 Members and 1 Guest are viewing this topic.

Offline Roni

  • Members
  • *
  • Play the Game !
Re:melee attack
« Reply #15 on: 20 Mar 2005, 06:30:40 »
I just threw the script together a few weeks ago and haven't really gone back to it.  When I left it the damage routine was simply

_target setDamage ((getdammage _target) + (random 1))


I agree that this is way to simplistic - I was going to create a "damage" rating for each weapon (fist, knife, riflebutt) and plug that in to the current "random 1" bit.

Give me a few days . . .



roni


Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:melee attack
« Reply #16 on: 27 Mar 2005, 08:09:48 »
well actualy i was talking to the other guy

Quote
Here's my (basic) solution for a melee attack :

The player's name is CM.
In his init field I put : this addAction ["Hit with rifle butt","Sg.sqs"]

And here's my script (Sg.sqs) :

CM action ["strokegun"]

if (CM distance Enemy1 <=3) then {Enemy1 setDamage 1}
if (CM distance Enemy2 <=3) then {Enemy2 setDamage 1}
if (CM distance Enemy3 <=3) then {Enemy3 setDamage 1}
if (CM distance Enemy4 <=3) then {Enemy4 setDamage 1}
if (CM distance Enemy5 <=3) then {Enemy5 setDamage 1}
if (CM distance Enemy6 <=3) then {Enemy6 setDamage 1}
if (CM distance Enemy7 <=3) then {Enemy7 setDamage 1}
if (CM distance Enemy8 <=3) then {Enemy8 setDamage 1}
if (CM distance Enemy9 <=3) then {Enemy9 setDamage 1}
if (CM distance Enemy10 <=3) then {Enemy10 setDamage 1}
if (CM distance Enemy11 <=3) then {Enemy11 setDamage 1}
if (CM distance Enemy12 <=3) then {Enemy12 setDamage 1}
if (CM distance Enemy13 <=3) then {Enemy13 setDamage 1}
if (CM distance Enemy14 <=3) then {Enemy14 setDamage 1}
if (CM distance Enemy15 <=3) then {Enemy15 setDamage 1}
if (CM distance Enemy16 <=3) then {Enemy16 setDamage 1}
if (CM distance Enemy17 <=3) then {Enemy17 setDamage 1}
if (CM distance Enemy18 <=3) then {Enemy18 setDamage 1}
if (CM distance Enemy19 <=3) then {Enemy19 setDamage 1}
if (CM distance Enemy20 <=3) then {Enemy20 setDamage 1}
if (CM distance Enemy21 <=3) then {Enemy21 setDamage 1}
if (CM distance Enemy22 <=3) then {Enemy22 setDamage 1}
if (CM distance Enemy23 <=3) then {Enemy23 setDamage 1}
if (CM distance Enemy24 <=3) then {Enemy24 setDamage 1}
if (CM distance Enemy25 <=3) then {Enemy25 setDamage 1}
if (CM distance Enemy26 <=3) then {Enemy26 setDamage 1}
if (CM distance Enemy27 <=3) then {Enemy27 setDamage 1}

exit


but ok sounds good, id like to beta test for ya

Offline Roni

  • Members
  • *
  • Play the Game !
Re:melee attack
« Reply #17 on: 28 Mar 2005, 06:53:53 »
I'm still working on the sample mission.  There should be no need to name each enemy unit, at the moment I'm working with an East Present trigger to get all East units, then assuming that your target is simply the nearest guy in this list (obtained via  short loop).

I'll post the sample mision when it's finished - I'm aiming for 24-30 unarmed loons with clubs (ie, empty rifles) vs 3-4 stalwart companions with shotguns and ball and their own version of the "club enemy senseless" script.

"Men of Harlech, march to glory,
Victory is hov'ring o'er ye . . ."



roni

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:melee attack
« Reply #18 on: 01 Apr 2005, 04:16:21 »
well, plz hurry, it sounds good.

bdfy1

  • Guest
Re:melee attack
« Reply #19 on: 13 Apr 2005, 13:26:25 »
Have you seen  UKF mod ? Even  its AI units can use bayonets. I depack it  and maybe you'll see a little tiny addon (of course real authors will be mentioned )
but it's not perfect: it looks pretty lubberly when they hit lying enemies without even touching them...
« Last Edit: 13 Apr 2005, 13:29:18 by bdfy1 »

TC

  • Guest
Re:melee attack
« Reply #20 on: 23 Nov 2005, 22:54:44 »
Is there no way to simply get the ai to use the strokefist weapons?