Home   Help Search Login Register  

Author Topic: Drop weapon  (Read 921 times)

0 Members and 1 Guest are viewing this topic.

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Drop weapon
« on: 20 Oct 2002, 06:25:58 »
Is there an action command that will make a soldier drop his weapon (and not pick another one up)?

Mike

  • Guest
Re:Drop weapon
« Reply #1 on: 20 Oct 2002, 06:36:20 »
You could remove the weapon and clip(s) from the unit..

playername removeweapon "M16"; playername removemagazine "M16";

do that in the init line and match that soldiers loadout.. put it in a trigger or something..

if you are using 1.46 (only version Ive played so far..) you dont need to stop him from picking up a gun.. Im assume u are wanting an ai without weapons bacause u called him a soldier.. I dont nkow how to prevent a player from not picking up a gun other than not letting the gun be there to pick up..
« Last Edit: 20 Oct 2002, 06:39:59 by Mike »

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Drop weapon
« Reply #2 on: 20 Oct 2002, 09:12:42 »
Or you could use the Drop Weapon command ;)

unit action ["Drop Weapon",unit,0,0,"weapon"]

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Re:Drop weapon
« Reply #3 on: 22 Oct 2002, 01:24:13 »
I have a Russian soldier named "Sur2" with an AK74, using this syntax in a trigger:

Sur2 action ["DROPWEAPON",Sur2,0,0,"AK74"]


He does not drop the weapon:(

By the way, what do the variables represented by 0 in the previous example control?

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Drop weapon
« Reply #4 on: 22 Oct 2002, 01:40:02 »
that because the command Sui gave you was:

Quote
unit action ["Drop Weapon",unit,0,0,"weapon"]

and not:

Quote
Sur2 action ["DROPWEAPON",Sur2,0,0,"AK74"]

as you wrote - the space between drop weapon is important  ;)
Proud Member of the Volunteer Commando Battalion

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Re:Drop weapon
« Reply #5 on: 22 Oct 2002, 01:49:38 »
Thanks, works fine now.