Home   Help Search Login Register  

Author Topic: AI take weapon from a crate  (Read 547 times)

0 Members and 1 Guest are viewing this topic.

Pravit

  • Guest
AI take weapon from a crate
« on: 18 Jul 2005, 17:31:43 »
I scanned through the "actions" sticky but I haven't seen anything on how the "take weapon" action works. It seems it would need two parameters - the weapon to take and the place to take it from. Has anyone used this action successfully?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:AI take weapon from a crate
« Reply #1 on: 18 Jul 2005, 21:44:16 »
Try:

unitname action ["take weapon",vehiclename,0,0,"weaponname"]

Unitname takes weapon of specified type from vehiclename,
vehiclename can be a vehicle, crate or body.
Ammo for weapon is also taken.

It might be best to make him go to the location of vehiclename first, otherwise he will magically take the weapon from a great distance.


Planck
I know a little about a lot, and a lot about a little.

Pravit

  • Guest
Re:AI take weapon from a crate
« Reply #2 on: 19 Jul 2005, 21:46:44 »
Neat! Thanks Planck.