j w 0 Posted February 14, 2006 I'm trying to make a side vs side MP mission, where you have the choice to surrender, wich meaning the loose their weapon, and also becomes captive so AI soldiers doesn't shoot you. But, I wanna do so that if you pick up a weapon you're not a captive anymore (set by setCaptive false) so that AI will open fire at you again, if you steal a dead guys weapon. Can it be detected by triggers or easy script when carrying a weapon (maybe that carrying a weapon means "this setCaptive false") or something? HELP! Darn, I hate that OFPEC is down Share this post Link to post Share on other sites
thobson 38 Posted February 14, 2006 The weapons command will return an array of all the weapons carried by a unit - you could have a trigger fire when this array is not empty. Â Alternatively primaryWeapon is another command that will return a string giving the name of the primary weapon carried by a unit. Â The trigger could fire whenever this is not = "" Quote[/b] ]Darn, I hate that OFPEC is down Me too. Share this post Link to post Share on other sites
j w 0 Posted February 15, 2006 Uhmm. I don't really understand that. Could you explain a little more? Thanks for helping anyways Share this post Link to post Share on other sites
thobson 38 Posted February 15, 2006 Well I am on holiday and so am away from my games computer and ofpec is down so I can't check their comref. So from memory try something like: @ (weapons unitname != []) or @ (unitname primaryWeapon != "") It may be a load of crap but it is worth experimenting with. Share this post Link to post Share on other sites
Sniperwolf572 758 Posted February 15, 2006 This is what I have in trigger for one of my missions, it will detect if unit POW has ANY weapons or ANY magazines (incl. Hand Grenades, Satchels, Smokes, etc.) in their inventory. Condition: ((count (weapons pow)) > 0) or ((count (magazines pow)) > 0) On Activation: pow setcaptive false Works great for me. Share this post Link to post Share on other sites
thobson 38 Posted February 15, 2006 Count!! That's it!! I was forgetting. Weapons unitname gives you an array of the weapons carried by the unit. Count weapons unitname will count how many wepaons the guy has. Share this post Link to post Share on other sites