OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Thanatos on 02 Nov 2005, 20:51:21

Title: force ai to take weapon
Post by: Thanatos on 02 Nov 2005, 20:51:21
hi
have been trying without sucess to force an ai unit (civil) to pick up a weapon from a fallen soviet  b4 joining player...
have experimented with the action command TAKEWEAPON  this  forces the ai to go through the motions and it looks as though he has taken a wepon.. however the swine is only  "doing the moves" and  dose not actually take a weapon

can anyone help me fix this  as it is an integral part of a mission  whichwith this problem ironed out will be set for release

  thanx in advance
                      thanatos
Title: Re:force ai to take weapon
Post by: Ding on 02 Nov 2005, 21:07:18
why dont you just addweapon it? i msure yo ucan make it look just the same
Title: Re:force ai to take weapon
Post by: Planck on 02 Nov 2005, 21:23:38
The action command is "TAKE WEAPON" not "TAKEWEAPON"

Usage listed here:


TAKE WEAPON
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.
Unitname can take weaponname from vehiclename even if unitname is on the other side of the island.



Planck
Title: Re:force ai to take weapon
Post by: Thanatos on 02 Nov 2005, 21:50:51
perfect
  thanx  mate