View Full Version : How many pipebombs
Lord Nausea
Nov 5 2001, 16:05
I need to know how many pipebombs a soldier has.
I tried 'ap ammo "pipebomb"' but this always results in 0.
Can anyone help?
(Edited by Lord Nausea at 7:05 pm on Nov. 5, 2001)
luderick
Nov 5 2001, 19:21
never see "pipe bomb" in this game? although the manul said there is.......... I think they mean "snatch charges" instead. If that is the case, it varies from different kind of soldiers, usually 4, civilian 3 and superisingly, machine gunner can take 6 if you throw away everything.
Damage Inc
Nov 5 2001, 19:25
Satchel charges are called pipebombs in the editor.
Lord Nausea
Nov 5 2001, 20:16
I don't want to know how many a person can carry but how many a person actually carries!
InqWiper
Nov 5 2001, 20:25
Err...none...a soldier doesnt have any Satchel Charges/Pipebombs, only Black Op and Black Op (day) carries them and they carry 3.
If U have satchel charges U can see it in the action menue ----> Put Satchel Charge (3 left) (or if U have 2 it will say 2...)
Lord Nausea
Nov 5 2001, 21:07
Yes I know. Normally only BlackOps carry satchels.
But I need always the actual number for a script I'm writing. I want to react to the number of satchels the person carries.
MotherRussiaAK74
Nov 5 2001, 21:10
SpetzNatz as well carries them.
I have been thinking that the satchel charges can be
used as a pretty evil weapon.
Arming one at the flags and setting it off when someone gets that flag.
dimitri has the flag *click* Boom!
Is there anyway to disarm Satchel Charges or Mines?
maodiver
Nov 8 2001, 22:33
you're right...that would be pretty evil.....
*me thinking -- "haha, got the flag, they never going to catch me!!!" BOOM.
ROTFLMAO
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Quote: from Lord Nausea on 1:05 am on Nov. 6, 2001
I need to know how many pipebombs a soldier has.
I tried 'ap ammo "pipebomb"' but this always results in 0.
Can anyone help?
[/QUOTE]<span id='postcolor'>
Show wholly script, what u use.
Space Cadet
Nov 9 2001, 09:36
the ammo command dosn't work because it is used to return the number of rounds currently loaded in a weapon.
For a M16 it will return between 0 and 30
For a law either 0 or 1
etc
as a pipebomb is not a weapon in this sense, it will always be zero, as a pipebomb has no ammo loaded.
Hmm, guess I'm, not being very useful, telling you why it dosn't work, but i'm not sure how to do this myself.
Sorry
unitName hasWeapon "PipeBomb" return ToF for unit. How get count of pipebombs i d'not know... yet.
Lord Nausea
Nov 9 2001, 11:42
I used 'unit ammo "pipebomb"'. That returns 0 for a OFP-generated BlackOp. But if I remove his pipebombs and the pipebomb-"weapon" and add it again, I have two entries for the pipebombs in my actionmenu. If I add the ammo before the weapon 'unit ammo "pipebomb"' returns the 1 as I want it to be.
Space Cadet
Nov 9 2001, 14:33
You could try something like this (this is untested, so probably full of errors :biggrin: )
_Unit = _this select 0
_Counter = 0
BombCount = 0
;check if the unit has any bombs
#CHECK
?(_Unit hasWeapon "PipeBomb" ) :Goto “REMOVE”
goto “End”
;remove a bomb and add one to bombcount
#REMOVE
_this removeweapon “PipeBomb”
BombCount = BombCount + 1
goto “CHECK”
;Add bombs again and exit script
#END
?(_Counter = BombCount):goto “EXIT”
_this addweapon “PipeBomb”
_Counter = _Counter + 1
goto “END”
#EXIT
Exit
what I'm trying to do is use see if the unit has any bombs, and if he does add one to BombCount, then remove a bomb. Loop this until he has no more bombs, then BombCount will equal the number of bombs he had.
I the add the apprapriate number of bombs back into his inventry.
Like I said it is untested so you will probably need to tweak it.
(Edited by Space Cadet at 6:56 pm on Nov. 9, 2001)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.