OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: danturn on 06 Jul 2008, 20:34:02

Title: removemagazine help [solved]
Post by: danturn on 06 Jul 2008, 20:34:02
When a unit reaches an ammo crate, he activates a trigger removing a particular number of magazines from himself, and adding those magazines to an ammo crate and i also need this to happen the other way around. My ammo crate is called "stash", and the unit named "bob".

How do i set up the trigger so that when it is activated, the magazines are removed from bob into the crate.

so far i have this in the activate field of the trigger

Code: [Select]
bob removemagazine ["rpo_obj2", 10]; stash addmagazinecargo ["rpo_obj2", 10]
however i get the phrase "removemagazine: Type Any, expected object.

what have i done wrong?
Title: Re: removemagazine help
Post by: bedges on 06 Jul 2008, 20:40:49
removemagazine (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=r#266) is expecting a string, as in

Code: [Select]
unit removemagazine "m16"
You can remove one at a time or all at once (removemagazines (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=r#267)), but not a defined number of them like you can with cargospaces.
Title: Re: removemagazine help
Post by: danturn on 06 Jul 2008, 20:41:41
Ahh, i see. Thanks very much.
Title: Re: removemagazine help
Post by: Planck on 06 Jul 2008, 20:41:54
Is "rpo_obj2" the classname of said magazine?


Planck
Title: Re: removemagazine help [solved]
Post by: danturn on 06 Jul 2008, 21:41:33
yes