OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Javito on 12 Aug 2006, 21:47:25
-
Okay, I'm going back and testing my first mission before I post it on the Beta forum in the coming week. Making a few little tweaks here and there. One thing I'd like is this. I have an anti-tank gun which must be manned by two men of your squad. It doesn't matter who, and I want the player to be able to choose which soldiers to assign where. I want a trigger to check and see if this gun is manned but I don't know how to do it. I know how if a specific soldier like r1 is manning the gun, but I don't know how to check if -anybody- from the USSR side is. Can anyone help me out?
-
gun_manned = false
#loop
~1
?not (side (gunner vehicle_name))=="east":goto "loop"
gun_manned = true
#loop2
?not ((gunner vehicle_name) in vehicle_name):gun_manned = false; goto "loop1"
exit
untested but should work.
-
Would this not work:
if (count crew vehiclename < 1) then {code for an unmanned vehicle} else {code for a manned vehicle}
?