OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Aquaphonic 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.
-
? (primaryWeapon loon1) != "AK74": loon1 setCaptive true
Syntax etc not guaranteed.
-
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"
-
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!