OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started 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
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?
-
removemagazine (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=r#266) is expecting a string, as in
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.
-
Ahh, i see. Thanks very much.
-
Is "rpo_obj2" the classname of said magazine?
Planck
-
yes