Home   Help Search Login Register  

Author Topic: Rearm from the rucksack script? Attn: scripters  (Read 711 times)

0 Members and 5 Guests are viewing this topic.

Offline SEAL84

  • Members
  • *
  • Always lurking
Rearm from the rucksack script? Attn: scripters
« on: 06 Oct 2003, 23:19:49 »
I just downloaded Andy's new rucksack addon - it works really well; it's a very cool (but basic) addon.

So I got to thinking....there's no point in giving it to an AI-controlled squad at all, since it requires the wearer to drop it before anybody can take any weapons.  Is there a script you could write that would automate the above process?  

For example - officer1, guy1 and guy2 are all in a group.  Guy1 is wearing the rucksack.  Guy2 runs low on ammo (last mag would be a good cutoff point I think).  Officer orders guy1 to drop the rucksack, then orders guy2 to take some ammo, then orders guy1 to put it back on.

Possible?

I think the hangups might be determining how many mags guy2 has left and using that to start the sequence of events.  The other problem is this:  you can put whatever you want in the bag (4 weapons AND 20 mags total), but what if guy2 is using a weapon that you haven't provided ammo for?

Would it then be possible to check for that and make guy2 choose a different weapon?

Another script (this one might be usable for lots of things) would check to see if guy1 was dead and then have some other loony (one without an AT weapon, unfortunately, because the bag is classified as a secondary weapon) pick the bag up so it could still be used by the rest of the squad.

Whaddya think?  Yes?  No?  Impossible?
« Last Edit: 07 Oct 2003, 00:12:32 by SEAL84 »

Offline rhysduk

  • Former Staff
  • ****
Re:Rearm from the rucksack script?
« Reply #1 on: 06 Oct 2003, 23:36:49 »
Christ yes this would be possible ;D One hell of an idea... Where can i get this addon for me to take a looksee for myself ? The Addons Depot maybe ?

Would there be a way of actaully enablin the player and/or the AI to take Weapons from the Rucksack wihtout the person carrying it, dropping it to the floor prior to the retreival of the weapons ?

Another Suggestion :-

Do you think it would be possible to incorporate Distance into the script (if made)... What i mean is if you run very low on ammo.. say like 3-5 rounds/bullets. It would be a bugger for the player and the RuckSack Carreir to run say (EG) 1500 metres before the player can rearm him/herself ??? So ultimately either the RUCKSACK Carrier could be grouped to a squad or actually camcreated close to the person that is in need of ammo...

Possible or not? Maybe someone could expand on this ?

Rhys
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Offline SEAL84

  • Members
  • *
  • Always lurking
Re:Rearm from the rucksack script?
« Reply #2 on: 07 Oct 2003, 00:01:36 »
You can find this addon over in Addons:Beta Testing...it should be one of the first posts on the page, then down towards the bottom of the thread there's a freewebs download link.

So to address your points:

1.  No, I don't think so.  AFAIK the bag has to be dropped (more realistic I think, you drop it and then open it up).  So unless someone needs it, the guy is just running around with this big bag on his back...it's coded like a secondary weapon.

2.  If you're the squad leader, there are no problems.  you can use the radio action menu to take care of that easily.  You can add the rucksack as a weapon to any guy you want, as long as he doesn't have an AT launcher on his back.  Again, it fits in the secondary slot, so you can just add it in the init field of any loony you like.

I was thinking of a rearm script for you to use if you weren't the leader, but had decided not to push my luck too early with that idea  :P  

We know that your character will automatically report "AMMO LOW" to your leader - you could use that event to have the group leader then initiate the AI rearm script (if someone thought one up based on my first post).  Your leader then tells your squad's ammo guy to drop the bag, and then you can go up to it and take what you need.  

There's also some event that changes your little soldier icon from red (when you have low ammo) back to normal.  Maybe that could be used to signal the ammo guy to pick his bag back up, since he won't otherwise.

So in general here's how it works: you can add the rucksack to any guy you want as a secondary weapon (just not an AT guy, since he already has a secondary).  If you're the group leader, it's easy to make people rearm.  The problem is getting the AI to do it and also getting your leader to do it if you are playing as just a squaddie.

And I should note that there is, for some reason to do with the scripting, about a 15 second delay before the bag becomes "active" when you drop it.  In other words you have to wait roughly that long after it's been dropped for anyone to be able to take anything from it.  It would be nice if someone could take a look at the coding for it (andy said it was messy) and see if there's a way to fix that.  It could be a hassle to wait that long in the middle of a firefight.