Home   Help Search Login Register  

Author Topic: AmmoBearer Script  (Read 600 times)

0 Members and 1 Guest are viewing this topic.

Bluelikeu

  • Guest
AmmoBearer Script
« on: 10 Dec 2004, 18:48:21 »
I've created a script that will cause a squad memeber to run around and give ammunition to units in a user defined list. The script is still in its beta stage, but it works perfectly.

 When a unit runs out of ammunition, a rearm unit will run to the trigger unit and pass him some ammunition.

 There are still some kinks in the script though. Instead of giving the unit ammunition only for his weapon, the unit will be given all the magazines in a user defined list of magazines. This will be easy to solve.

 Another problem is that I wanted to incorperate the idea of the user being able to define how much ammunition the AmmoBearer will have, and allow the user to assign a group of units to be ammobearers. This should also be easy to fix.

 However, i had left this script abandoned for about 1 year, and have forgotten many ideas that I had. So i would like you guys to comment on some things that would be interesting in the script; things that you would like to see. One good thing(LOL), the script does not require any addons. I'm looking forward to bringing this script out, and I hope that someone else hasn't already made a script like this, other than the Invasion 1944 team, as it would be quite embarassing.

So, out with your comments!

PS: I will not be posting it until i feel that i cannot be blamed for any errors.

(THE SCRIPT IS AT THE 7th POST AND THE EXAMPLE MISSION WITH THE SCRIPT IS AT THE 9th)

Enjoy!
« Last Edit: 16 Dec 2004, 09:09:57 by Bluelikeu »

Dubieman

  • Guest
Re:AmmoBearer Script
« Reply #1 on: 10 Dec 2004, 20:44:04 »
This would be a neat little script for machine gunners assistants.

I never knew about the script I44 uses until I was a BAR gunner with my assistant and found I could take mags. Before I thought the assistants were useless, cause they didn't carry the right ammo. :P :-[

Not sure that many soldiers share ammo, but a general resupply would be good and like I said before the heavy weapons guys. :)

Bluelikeu

  • Guest
Re:AmmoBearer Script
« Reply #2 on: 11 Dec 2004, 07:47:41 »
That was my original idea for the script. I didn't wan't to stick around in a static mg42 with no ammo while people pop-up all around it. Thats why I began the script.

Anyway, when the Ammobearer runs up to the triggering soldier, he just runs back. It looks really cheesy :D. I was thinking of editing this, when I noticed that I had an exam the next day. ??? So any ideas on what you would want "visually" to happen in the ammunition transaction?

Bluelikeu

  • Guest
Re:AmmoBearer Script
« Reply #3 on: 11 Dec 2004, 10:35:26 »
Ok

I've corrected the error where the unit was given ammunition for every weapon. It now checks to see if the unit has a weapon in the list.

The user is also able to define how many magazines for each weapon the ammobearer has.

The ammobearer will now not run up to a soldier if he has no weapon.

The ammobearer still, however runs up to the soldier if the ammobearer doesn't have any magazines left for the soldier. This bug needs to be fixed.

Ammobearer groups cannot be assigned yet.

Ammobearer will now give himself ammo.

Supplies of ammo cannot be changed during the game.

oh..yeah, and it doesn't work for multiplayer yet, and can only be used on one group
at a time.

Thanks,
Bluelikeu
« Last Edit: 11 Dec 2004, 10:41:05 by Bluelikeu »

Bluelikeu

  • Guest
Re:AmmoBearer Script
« Reply #4 on: 11 Dec 2004, 10:45:37 »
ok, just made it so there can be more than one ammobearer.

and, i added a little condition that if the unit is more the "50" away from the ammobearer, he will not come. Not sure what units "50" have.
« Last Edit: 11 Dec 2004, 10:48:07 by Bluelikeu »

Bluelikeu

  • Guest
Re:AmmoBearer Script
« Reply #5 on: 11 Dec 2004, 11:39:31 »
i've fixed the error where the ammobearer will run up to the unit even if he didn't have that ammo type.

I think that the script is almost ready to distribute

Thanks,
Bluelikeu

Bluelikeu

  • Guest
Re:AmmoBearer Script
« Reply #6 on: 11 Dec 2004, 11:52:27 »
--OBSOLETE SCRIPT--
USE THE EXAMPLE MISSION ON RESPONSE #9
I'm Ready to distribute the copy of the Script

All major errors and bugs are fixed.
The script does not work in multiplayer.
The script only works on one squad. If you want to use it on multiple groups, you will need to change global variables so that they have different names for each instance.

I'm planning on combining the script into one .sqs file. So hold tight.

To activate the script, do the following:
1.)Create a group of say 5 people
2.)Give one of them a name.(This will be the ammobearer)
3.)Write in the init field:  [[This], ((Units group this)), ["m16", "m60", "m21"], ["m16", "m60", "m21"], [5,5,5]] Exec "Rearm.sqs"; (Put everything except Exec "Rearm.sqs" between brackets.)

4.)Format is: [(Name of AmmoBearer), (Array of magazines), (Array of weapons), (Array of number of supplies for each magazine)] Exec "Rearm.sqs"

5.)Make sure that the first entry in the magazine array corresponds with the first in the weapons array and the array of supplies for each magazine.

Please notify me if there are any bugs at:
Bluelikeu32@hotmail.com
Here's the current v0.84b of the script
« Last Edit: 17 Dec 2004, 12:03:46 by Bluelikeu »

DBR_ONIX

  • Guest
Re:AmmoBearer Script
« Reply #7 on: 15 Dec 2004, 20:14:09 »
Not tested yet, but maybe an example mission (Using BIS units)? :)
- Ben

Bluelikeu

  • Guest
Re:AmmoBearer Script
« Reply #8 on: 16 Dec 2004, 09:06:31 »
Ok, here's an example mission with the script.
This is the updated version.
It should work in multiplayer.
You can now run multiple instances of the script at any time.
« Last Edit: 17 Dec 2004, 12:07:08 by Bluelikeu »