Home   Help Search Login Register  

Author Topic: removemagazine help [solved]  (Read 1225 times)

0 Members and 1 Guest are viewing this topic.

Offline danturn

  • Members
  • *
removemagazine help [solved]
« 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?
« Last Edit: 06 Jul 2008, 20:42:15 by danturn »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: removemagazine help
« Reply #1 on: 06 Jul 2008, 20:40:49 »
removemagazine is expecting a string, as in

Code: [Select]
unit removemagazine "m16"
You can remove one at a time or all at once (removemagazines), but not a defined number of them like you can with cargospaces.

Offline danturn

  • Members
  • *
Re: removemagazine help
« Reply #2 on: 06 Jul 2008, 20:41:41 »
Ahh, i see. Thanks very much.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: removemagazine help
« Reply #3 on: 06 Jul 2008, 20:41:54 »
Is "rpo_obj2" the classname of said magazine?


Planck
I know a little about a lot, and a lot about a little.

Offline danturn

  • Members
  • *
Re: removemagazine help [solved]
« Reply #4 on: 06 Jul 2008, 21:41:33 »
yes