Home   Help Search Login Register  

Author Topic: Satchels in Ammo Trucks?  (Read 507 times)

0 Members and 2 Guests are viewing this topic.

GCountach

  • Guest
Satchels in Ammo Trucks?
« on: 11 Nov 2003, 04:46:48 »
Okay, here's the thing. I am trying to make a golf game.  You use satchels to blow up your golf balls (cars) into areas (call em "holes").  Now, this wasn't my idea, but I wanna do it.  So anywho, I'm a complete n00b and I'm still working on learning everything.... Heres the problem...

I want to make my ammo truck my golf cart.  Complete with more "clubs" (satchels) than any rookie could ever need.

-Is it possible?

-How?

I tried to make a script....

ClearMagazineCargo rearmtruck1;
ClearWeaponCargo rearmtruck1;
rearmtruck1 AddWeapon "Pipebomb";

ClearMagazineCargo rearmtruck2;
ClearWeaponCargo rearmtruck2;
rearmtruck2 AddWeapon "Pipebomb";

ClearMagazineCargo rearmtruck3;
ClearWeaponCargo rearmtruck3;
rearmtruck3 AddWeapon "Pipebomb";

Hint "ReArm Truck Script Complete"
Exit


As you can see, there are going to be 3 carts.  I get the hint (showing it runs) and there are no nades or magazines in the truck.  However, there isn't any Satchels either.  Am I missing something here, or is it just not possible?

Thanks in advance.

Offline oyman

  • Members
  • *
  • king of pings
Re:Satchels in Ammo Trucks?
« Reply #1 on: 11 Nov 2003, 04:56:27 »
instead of
rearmtruck1 AddWeapon "Pipebomb";
try puttin in
rearmtruck1 AddMagazine "PipeBomb";
see if this works
and have made a little scirpt to go with it
i also recommend u getting this scirpt maker perfect for n00bs http://ofpec.com/editors/resource_view.php?id=377
« Last Edit: 11 Nov 2003, 05:33:15 by oyman »

GCountach

  • Guest
Re:Satchels in Ammo Trucks?
« Reply #2 on: 11 Nov 2003, 05:22:20 »
Okay, I changed it to this....

ClearMagazineCargo rearmtruck1;
ClearWeaponCargo rearmtruck1;

ClearMagazineCargo rearmtruck1;
rearmtruck1 AddWeaponCargo ["Pipebomb", 2];

ClearMagazineCargo rearmtruck2;
ClearWeaponCargo rearmtruck2;
rearmtruck2 AddWeaponCargo ["Pipebomb", 2];

ClearMagazineCargo rearmtruck3;
ClearWeaponCargo rearmtruck3;
rearmtruck3 AddWeaponCargo ["Pipebomb", 2];

Hint "ReArm Truck Script Complete"
Exit


And now when I get near either of the 3 trucks, it shows up "Take satchel charges".  Problem is..... that's the only part that works...

When you pick it up, it doesn't get rid of 2 nades (or magazines) to make room for it.  When I made room for it, it still didn't work.  On the Action menu, it shows up "Put Satchel Charges (3 Left)" twice.  Now, mind you I'm a black ops (day), so I get 3 to start with.

Heres another weird thing.  After I pick one up out of one of the trucks, it disappears out of the other ones too.  and they are all named differently.  Blah, script writing is 70% know-how and 30% luck....

(EDIT): after I pick up one, I blew myself up with one of them.  I respawned, and went back to the trucks and only two were left.  However, they still don't appear in my list.  I assume I need to something along the lines of "action" or something like when they choose to take one out, it just edits my inventory.  Or... if I can figure it out, I can just make it where if I am missing a charge, it will put another one in its place.
« Last Edit: 11 Nov 2003, 05:27:22 by GCountach »

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Satchels in Ammo Trucks?
« Reply #3 on: 11 Nov 2003, 06:52:32 »
Satchel charges (and mines, and really any "ammo" that isn't shot out of a weapon) are kinda funky. Here's the deal: your blackop already has the satchel charge "weapon"; even when he is out of charges, he still has the "weapon" (it doesn't show up in your inventory). What you pick up, and what goes into your inventory, is the "magazine" for this weapon. So what you need to do is "addMagazineCargo", not "addWeaponCargo".

Just put this in the init field of the trucks:

clearMagazineCargo this; this addMagazineCargo ["Pipebomb",9999]
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

GCountach

  • Guest
Re:Satchels in Ammo Trucks?
« Reply #4 on: 11 Nov 2003, 07:02:54 »
That was the ticket.  Thanks a bunch man.  I'll try that script maker too.  It looks...  easy.
« Last Edit: 11 Nov 2003, 07:09:19 by GCountach »

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Satchels in Ammo Trucks?
« Reply #5 on: 11 Nov 2003, 07:12:33 »
Glad to help.  8)

Now just hit the "solve" button in the bottom corner of the page, so people know this thread is solved ::)
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!