Home   Help Search Login Register  

Author Topic: Conditional loss of ammunition for multiple units  (Read 707 times)

0 Members and 2 Guests are viewing this topic.

BLITZKRIEG_ROF

  • Guest
Conditional loss of ammunition for multiple units
« on: 10 Aug 2004, 13:14:48 »
I'm making a MP mission (the same one from my time compression thread), and I've run into a snag.

What would be the best way to have all the shilkas on the map lose all thier ammo upon the destruction of a specific object?

Also, I'm wondering if it's possible to have a second group of shilkas that are linked to a separate destroyable object in the same way.

I'm going for a Freedom Fighters effect, where if you blow one thing up, it effects the entire map.

Offline Mud_Spike

  • Contributing Member
  • **
Re:Conditional loss of ammunition for multiple units
« Reply #1 on: 10 Aug 2004, 13:43:32 »
Put the shilka's names in an array and do something like
Code: [Select]
"removeAllWeapons _x" foreach shilka_arrayor:
Code: [Select]
"removeAllWeapons _x" foreach [shilka_0,shilka_1,shilka_2,shilka_3,......]
removeAllWeapons _should_ work, if not, play with removeMagazines with friends.
Cant verify this at work.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Conditional loss of ammunition for multiple units
« Reply #2 on: 10 Aug 2004, 14:15:50 »
Mud_Spike's code could go in the On Activation field of a trigger.   In the condition line you might have

not alive loon1

or maybe its just an East not present trigger ... whatever the objective is really.
Plenty of reviewed ArmA missions for you to play

BLITZKRIEG_ROF

  • Guest
Re:Conditional loss of ammunition for multiple units
« Reply #3 on: 10 Aug 2004, 15:55:09 »
Okay, basically, I want to simulate a truck as a moble command center for the air defenses. When the truck is destroyed, the shilkas are rendered useless. I want it so that when a Ural truck is destroyed, all the shilkas don't have any ammo.

I've tried the removeallweapons command, and it didn'a work, as well as the removemagazinecargo one.

Any other ideas?

Offline Mud_Spike

  • Contributing Member
  • **
Re:Conditional loss of ammunition for multiple units
« Reply #4 on: 10 Aug 2004, 16:02:59 »
removeMagazineCargo is for ammo-containers (i.e., ammo-boxes, vehicles) and is
not used by the unit hosting them (in the case of vehicles).

removeAllWeapons should work. How are you using it?
Have you named your shilka units in the editor?
If so, does  hint format ["%1", shilka_unit_name]  report something like "EAST DELTA Black four",
or "...0xffffffffe.."?

Paste your removeAllWeapons code and tell us how it is being executed (Trigger conditions..)


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Conditional loss of ammunition for multiple units
« Reply #5 on: 10 Aug 2004, 16:06:49 »
Try removeMagazines.    Make sure you have the correct name for the ammo.
Plenty of reviewed ArmA missions for you to play

BLITZKRIEG_ROF

  • Guest
Re:Conditional loss of ammunition for multiple units
« Reply #6 on: 10 Aug 2004, 16:35:23 »
Alright, i'll give 'em a shot

BLITZKRIEG_ROF

  • Guest
Re:Conditional loss of ammunition for multiple units
« Reply #7 on: 10 Aug 2004, 18:29:49 »
The removeallweapons worked this time around. Perhaps I had done it wrong.

Alright, the other problem is liking the loss of weapons to the destruction of a Ural truck. What would be the best way to do that?

Offline Mud_Spike

  • Contributing Member
  • **
Re:Conditional loss of ammunition for multiple units
« Reply #8 on: 10 Aug 2004, 19:04:09 »

Exactly what MacGuba said:

Mud_Spike's code could go in the On Activation field of a trigger.   In the condition line you might have

not alive loon1

or maybe its just an East not present trigger ... whatever the objective is really.

where loon1 is the name of your comms truck.

BLITZKRIEG_ROF

  • Guest
Re:Conditional loss of ammunition for multiple units
« Reply #9 on: 10 Aug 2004, 21:17:29 »
Hmm. Excellent. Sorry for not reading more carefully.

Again, thanks for your help. I'll test it out, and if it works, i'll SOLVE the thread.