Home   Help Search Login Register  

Author Topic: not taking ammo  (Read 586 times)

0 Members and 1 Guest are viewing this topic.

Djoker

  • Guest
not taking ammo
« on: 14 Feb 2004, 11:44:13 »
hi,

i have this mission where 2 civilians ride a car with some weapons and ammo. i've ordered to get out somewhere. when they get out they have to take weapons and ammo from their car. this doesn't work

i've used this script:
Code: [Select]
_manone = _this select 0
_mantwo = _this select 1
_vehicle = _this select 2

_manone SetBehaviour "careless"
_mantwo SetBehaviour "careless"
_manone MoveInDriver _vehicle
_mantwo MoveInCargo _vehicle

_vehicle AddWeaponCargo ["ak47",2]
_vehicle AddMagazineCargo ["ak47",12]
_vehicle AddWeaponCargo ["kozlice",2]
_vehicle AddWeaponCargo ["kozliceball",12]
_vehicle AddWeaponCargo ["kozliceshell",6]

#check
? not(_manone in _vehicle): goto "getammo"
? not(_mantwo in _vehicle): goto "getammo"

;this is the part i'm stuck.
#getammo
_manone action ["take weapon",_vehicle,"ak47",1]
_manone action ["take magazine",_vehicle,"ak47",6]
_manone action ["reload","ak47"]
_mantwo action ["take weapon",_vehicle,"ak47",1]
_mantwo action ["take magazine",_vehicle,"ak47",6]
_mantwo action ["reload","ak47"]


help would do me good :P
« Last Edit: 14 Feb 2004, 11:56:24 by Joker »

Offline rhysduk

  • Former Staff
  • ****
Re:not taking ammo
« Reply #1 on: 14 Feb 2004, 18:09:03 »
Hi,

Wouldnt it be easier for you to add teh weapons and magaznes to the civies instead of using :-

Code: [Select]
_manone action ["take weapon",_vehicle,"ak47",1]
but instead use

Code: [Select]
[i]nameofcivie[/i] addweapon "ak47"  and then add the mags?

Rhys
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Djoker

  • Guest
Re:not taking ammo
« Reply #2 on: 15 Feb 2004, 11:53:46 »
but i find it cooler if they take the weapons and ammo from the car.
like they have weapons and ammo in their trunk.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:not taking ammo
« Reply #3 on: 15 Feb 2004, 13:58:30 »
What do you mean, "it doesn't work?"     How do you know?   What happens?
Plenty of reviewed ArmA missions for you to play

Offline Welshmanizer

  • Members
  • *
Re:not taking ammo
« Reply #4 on: 15 Feb 2004, 17:01:43 »
There you go:

Code: [Select]
_manone = _this select 0
_mantwo = _this select 1
_vehicle = _this select 2

_manone SetBehaviour "careless"
_mantwo SetBehaviour "careless"
_manone MoveInDriver _vehicle
_mantwo MoveInCargo _vehicle

_vehicle AddWeaponCargo ["ak47",2]
_vehicle AddMagazineCargo ["ak47",20]
_vehicle AddWeaponCargo ["kozlice",2]
_vehicle AddMagazineCargo ["kozliceball",12]
_vehicle AddMagazineCargo ["kozliceshell",6]

#check
@ not (_manone in _vehicle) and not (_mantwo in _vehicle)

#getammo

_manone action ["take weapon",_vehicle,0,0,"ak47"]
_manone playmove "CombatReloadMagazine"

_mantwo action ["take weapon",_vehicle,0,0,"ak47"]
_mantwo playmove "CombatReloadMagazine"


When they take the weapon, they'll automatically take as much ammo as they can, so you either let them take 10 mags each or don't add any ammo to the car and add the mags manually, like so:



Code: [Select]
_manone = _this select 0
_mantwo = _this select 1
_vehicle = _this select 2

_manone SetBehaviour "careless"
_mantwo SetBehaviour "careless"
_manone MoveInDriver _vehicle
_mantwo MoveInCargo _vehicle

_vehicle AddWeaponCargo ["ak47",2]
_vehicle AddWeaponCargo ["kozlice",2]
_vehicle AddMagazineCargo ["kozliceball",12]
_vehicle AddMagazineCargo ["kozliceshell",6]

#check
@ not (_manone in _vehicle) and not (_mantwo in _vehicle)

#getammo

_manone addmagazine "ak47"
_manone addmagazine "ak47"
_manone addmagazine "ak47"
_manone addmagazine "ak47"
_manone addmagazine "ak47"
_manone addmagazine "ak47"
_manone action ["take weapon",_vehicle,0,0,"ak47"]
_manone playmove "CombatReloadMagazine"

_mantwo addmagazine "ak47"
_mantwo addmagazine "ak47"
_mantwo addmagazine "ak47"
_mantwo addmagazine "ak47"
_mantwo addmagazine "ak47"
_mantwo addmagazine "ak47"
_mantwo action ["take weapon",_vehicle,0,0,"ak47"]
_mantwo playmove "CombatReloadMagazine"


Btw, the reload action doesn't work.
« Last Edit: 15 Feb 2004, 22:05:00 by Welshmanizer »

magnar

  • Guest
Re:not taking ammo
« Reply #5 on: 17 Feb 2004, 09:06:49 »
maybe you could have the guys "take" the weapons by doing the  ~unit addweapon "weapon"~ in conjunction with a switch move......you could make a small and simple script for it.  If you add pick up and relaoding animations, it could look as good as you want.......