Home   Help Search Login Register  

Author Topic: scavenging AI  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

Offline rado1265

  • Members
  • *
scavenging AI
« on: 23 Feb 2005, 19:13:31 »
Ave!

Do anybody knows a command that force a single unarmed AI unit to scavenge the weapons and other gear from the dead bodies?

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:scavenging AI
« Reply #1 on: 23 Feb 2005, 19:21:17 »
There is no such command, however you can simulate it to look as though he is picking up a weapon from a body with this simple script.

Code: [Select]
_HomieWhoneedsguns = _this select 0
_HomieWhoneedsguns domove getpos Deadbody
@(_HomieWhoneedsguns distance Deadbody > 5)
_HomieWhoneedsguns switchmove "Combattoputdown"
~1
_HomieWhoneedsguns addweapon "AK47"
exit

Assuming you already know how to use .sqs files this should work fine.
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline rado1265

  • Members
  • *
Re:scavenging AI
« Reply #2 on: 23 Feb 2005, 20:07:57 »
There's no such command? But I think it must be, burried somewhere inside the OFP (when your squad lider orders you - EDIT: or some one else from your squad, then the loon executes the command - to rearm at the dead body), so I've thinked like - some one has to "dig it out" already.

I have the script similar to yours, but I try to achieve a total naturalness (what the dead body have that you receive).

But in case that there's really no such command, I'll be satisfied with the (yours and mine) scripts.

Thank you for your reply!
« Last Edit: 23 Feb 2005, 20:28:13 by karantan »

StonedSoldier

  • Guest
Re:scavenging AI
« Reply #3 on: 23 Feb 2005, 21:09:55 »
you could make it a bit more realistic

_unarmedguy domove getpos _deaddude
@(_unarmedguy distance _deaddude)<2
_unarmedguy action ["take weapon",_deadude,0,0,primaryweapon _deadude]


Offline rado1265

  • Members
  • *
Re:scavenging AI
« Reply #4 on: 23 Feb 2005, 23:20:49 »
_unarmedguy action ["take weapon",_deadude,0,0,primaryweapon _deadude]
That's it, that's the line that I need!   Have one lager on my expenses, StonedSoldier! :cheers:

Thank you, bro. ;)

EDIT: Problem solved.
« Last Edit: 23 Feb 2005, 23:23:00 by karantan »