OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: thevillage1990 on 18 Apr 2004, 18:26:37

Title: Ammo bearers...
Post by: thevillage1990 on 18 Apr 2004, 18:26:37
Hey everyone!
I've got an idea going where you can have ammo bearers which, as the title suggests... gives you ammo  :D. I'm thinking somewhere along the lines of combining the artillery script (for activating the script when the plays in a certain area (close to the ammo bearer) but it's just a case of locking it to the ammo bearer) and the parachute script (to give the player ammo by editing the 'eject' sequence to give the right ammo. It's just an idea and if someone would research the idea more perhaps you may never need to be concerned with your ammo!  :)
Thanks!
thevillage1990 :-*
Title: Re:Ammo bearers...
Post by: myke13021 on 18 Apr 2004, 18:50:05
damn my english..what the hell is/are "bearers"?
Title: Re:Ammo bearers...
Post by: Planck on 18 Apr 2004, 18:52:42
ammo bearers = ammo carriers.

Guys who carry extra ammo for the squad.


Planck
Title: Re:Ammo bearers...
Post by: myke13021 on 18 Apr 2004, 19:00:16
oic...thx Planck

sounds like an easy to make script for one-time-use...or maybe this could be a thread for the addons ideas...a soldier with cargo space and a backpack
Title: Re:Ammo bearers...
Post by: General Barron on 19 Apr 2004, 03:39:09
You don't need an addon. Just put this in a unit's init line:

this addMagazineCargo ["magazineType", x]

This will add x number of magazines to the guy, as if he were an ammo crate.
Title: Re:Ammo bearers...
Post by: myke13021 on 19 Apr 2004, 03:41:32
well, it was just an idea that a guy which carry ammo, should have a backpack...i was just guessing it looks more realistic...else you would ask: "hey, where does this guy carry all this amm? in his pantyhose?"  ;D
Title: Re:Ammo bearers...
Post by: Sniper_Kyle on 20 Apr 2004, 01:14:28
You should really download the Invasion 1944 mod in which this has already been nicely implemented  ;) or you can just download that Rucksack thing and put mags in that ;)

Cheers,
    Sniper_Kyle ;D
Title: Re:Ammo bearers...
Post by: Kammak on 28 Apr 2004, 02:59:45
You don't need an addon. Just put this in a unit's init line:

this addMagazineCargo ["magazineType", x]

This will add x number of magazines to the guy, as if he were an ammo crate.

Was this a joke?  I tried this, but it doesn't seem to do anything...no error, but also no gear added to the soldier.  Does he have to die before you can access the "cargo"?
Title: Re:Ammo bearers...
Post by: Terox on 28 Apr 2004, 16:02:28
simply attach an adaction script to a unit and have that addaction script run a version of Drax's BF weapon selection  dialog system
Title: Re:Ammo bearers...
Post by: Kammak on 30 Apr 2004, 22:11:46
bump

General Barron?  Can anyone answer my question above
Title: Re:Ammo bearers...
Post by: General Barron on 01 May 2004, 21:02:47
Was this a joke?  I tried this, but it doesn't seem to do anything...no error, but also no gear added to the soldier.  Does he have to die before you can access the "cargo"?


No, it wasn't a joke. I did it before, but that was before I had resistance. Maybe you can't do it now in resistance.  :-[
Title: Re:Ammo bearers...
Post by: Kammak on 01 May 2004, 23:07:56
Ah.  Too bad.  That would have been a fun "cheat" to exploit sometimes.  You can never have too many javelin missiles afterall!

Thanks
Title: Re:Ammo bearers...
Post by: SandVoss on 06 May 2004, 16:08:49
Making ammo bearers is actually extremely easy... If you are the squad leader you have the ability to make units drop ammo trough 2 ways:

-order a unit to drop ammo through the command matrix, but this takes a long time.

-The other, much easier way is to go to your map, go to your notebook, and click on "gear". From there, go to the loadout of the unit u want to drop ammo. Then simply click on the bit of ammo you want the unit to drop... And voila, a fresh packet of ammo is on the ground for ur usage... :D :D

You can then pick up the ammo yourself, or get other units to pick it up by pointing at it and getting a unit to pick it up through the command matrix. Easy...  ;D
Title: Re:Ammo bearers...
Post by: Komuna on 07 May 2004, 15:03:53
I tried this once (here (http://www.ofpec.com/yabbse/index.php?board=13;action=display;threadid=13239;start=0)) but I didn't care much about proceeding with this addon.

Anyway, it's very simple:

Create an addon for an invisible unit (create a model in O2 with the name of the selections of a regural unit, but remove any points from LOD's, geometry settings, hit-points, etc.). Then configure this to be dead on init (EH "init" --> init="(_this select 0) setDammage 1"), to carry no weapons (remove 1,16, 32 and 4096 from the available weapon slots) and carry the highest amount of mags (4xHandGun and 10xMiscMags).

Once you've configured this unit, make a script that will place this unit next to another one (constantly). Ensure that the invisible unit has the required magazines. And that's it.

No further scripting is required, since the alive units will automatically take the ammo from the nearest deadbodies. Be sure that your ammo bearer is always near, as the AI doesn't catch ammo from deadbodies that distance more than 50m. You can also add a script to refresh the ammount of magazines available in the invisible unit.