Home   Help Search Login Register  

Author Topic: "1" Objstatus "done" ; T1 hasWeapon "Pipebomb"  (Read 927 times)

0 Members and 1 Guest are viewing this topic.

Wildcat22

  • Guest
"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« on: 28 Apr 2004, 21:43:02 »
Hello,

I'd like to make an objective done when a player (named "T1") has the pipe bomb. I know how it works and I looked it up in the official com.ref .

But the function "hasWeapon" doesn"t work. Can someone help me ? Thanks a lot in advance  :)

j-man

  • Guest
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #1 on: 28 Apr 2004, 21:47:03 »
Could you explain a little bit more? Mabey, if your using a script or trigger, etc...

Wildcat22

  • Guest
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #2 on: 28 Apr 2004, 21:57:28 »
Well I use triggers, 2 of them. One activates the obj status to "done" when "armes" (condition from the first trigger) = true.

The init for "armes" is "T1 hasWeapon "Pipebomb" " but that last doesn't work (it tells me I need bool or something you know the thing).

So I'd like to have the first objective completed when the player has a pipebomb that he has to get from an ammo crate.  :)

Wildcat22

  • Guest
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #3 on: 28 Apr 2004, 22:28:08 »
Up  ;D

If I'm not clear enough tell me  ;)

Wildcat22

  • Guest
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #4 on: 28 Apr 2004, 22:40:52 »
Nevermind I think I solved it  :-[ ;D


Doh...
« Last Edit: 28 Apr 2004, 22:47:48 by Wildcat22 »

Wildcat22

  • Guest
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #5 on: 28 Apr 2004, 23:07:21 »
I managed to do it with any weapon, but there is a problem with the "pipebomb"...

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #6 on: 29 Apr 2004, 08:01:17 »
I think the problem is that "pipebomb" isn't a weapon; it is technically a "magazine" for the weapon "put" (an invisible weapon that everybody has). So instead of using 'hasweapon', you may be able to use the "ammo" command:

unit ammo "magazine"

This returns a number; the number of shots in the persons current magazie. So in your case, try putting this in the trigger's condition field:

T1 ammo "pipebomb" > 0

Maybe even try putting "put" instead of "pipebomb". Hope it works :(
« Last Edit: 29 Apr 2004, 08:07:07 by General Barron »
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!

Wildcat22

  • Guest
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #7 on: 29 Apr 2004, 10:42:31 »
Thank you I'll check it out  ;)

Wildcat22

  • Guest
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #8 on: 29 Apr 2004, 10:51:53 »
Thank you, it worked with "put"  :)

Wildcat22

  • Guest
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #9 on: 29 Apr 2004, 11:18:15 »
The same thing worked for any weapon but now (and I don't know why) it doesn't work anymore. Could you help me ?

Is it right ?

Cond.            Ap HasWeapon "Ak47"
On Act.          test = true

("test" worked for the pipebomb thing you told me).

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #10 on: 29 Apr 2004, 11:31:52 »
Indeed... a pipebomb is considered to be a magazine.

If you ever want to get a list (well... an array actually) of the magazines in a unit's inventory, try:

magazines unit

To test to see if there is a pipebomb in there, try:

"Pipebomb" in (magazines unit)

That should do the trick ;)

Wildcat22

  • Guest
Re:"1" Objstatus "done" ; T1 hasWeapon "Pipebomb"
« Reply #11 on: 29 Apr 2004, 12:29:59 »
Thank you  :)