Home   Help Search Login Register  

Author Topic: Weapon Problem  (Read 502 times)

0 Members and 2 Guests are viewing this topic.

Offline Aquaphonic

  • Members
  • *
Weapon Problem
« on: 16 Jul 2004, 00:43:27 »
I am currently making a map where I have a unit who has setcaptive true. When my unit picks up a weapon (AK47 lets say) setcaptive changes to false.

My problem is I would like setcaptive to be changed back to true when my unit drops his weapon.

Any help most appreciated.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Weapon Problem
« Reply #1 on: 16 Jul 2004, 01:15:19 »
? (primaryWeapon loon1) != "AK74": loon1 setCaptive true

Syntax etc not guaranteed.
Plenty of reviewed ArmA missions for you to play

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Weapon Problem
« Reply #2 on: 16 Jul 2004, 01:35:37 »
Would PrimaryWeapon return null if he had none? Try null and objnull pharhaps. That way it should work with any weapon. But I'm just talking what I'm thinking, so don't call me a liar if it doesn't work.

#loopadoo
? (primaryWeapon loon1) != "null": loon1 setCaptive true
~1
goto "loopadoo"
Not all is lost.

Offline Aquaphonic

  • Members
  • *
Re:Weapon Problem
« Reply #3 on: 16 Jul 2004, 02:46:04 »
Thank you both for your promt replies, everything works as I want it to.

I'll be keeping those bits of code in my snippets from now on.

Cheers!