Home   Help Search Login Register  

Author Topic: reamr when empty  (Read 1007 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
reamr when empty
« on: 15 May 2005, 11:29:08 »
okay i have a Vulcan wich when it uses all its ammo i want it to automatically rearm instead of it calling for support because the rearm trucks get blown up from the choppers
So what would i put in a trigger, init field what ever needed to see when the vulcan has no ammo left to give it about 3/4 of full ammo.

Also sorry i spelt the title wrong can someone please sort it out. im a bit tired
« Last Edit: 15 May 2005, 11:36:05 by 456820 »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:reamr when empty
« Reply #1 on: 15 May 2005, 11:42:46 »
Try:
Condition
tankname ammo "VulcanCannon" < 0

Activate:
tankname removeMagazines "VulcanCannon";tankname addMagazine "VulcanCannon"

However this will give you a full load of ammo (one magazine is a full load) .  The reason for removing the magazine first is so that the new magazine replaces what is already there and does not add to it.

I have not tested this.  You may need to check out the command ammo in the comref
http://www.ofpec.com/editors/comref.php?letter=A#ammo
« Last Edit: 15 May 2005, 11:50:15 by THobson »

Offline 456820

  • Contributing Member
  • **
Re:reamr when empty
« Reply #2 on: 15 May 2005, 11:47:50 »
thanks for that but how do i make that happen when the vulcan is out of ammo

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:reamr when empty
« Reply #3 on: 15 May 2005, 11:49:05 »
I was editing when you were posting.  Check my first reply again.

Offline 456820

  • Contributing Member
  • **
Re:reamr when empty
« Reply #4 on: 15 May 2005, 11:49:59 »
oh okay i will test that now cheers