mr_shadow 4 Posted March 8, 2014 (edited) Hello guys, I have playeble: unit1, unit2 and unit 3. There is an object on a map that have: station1 addAction ["Take a hostage","take1.sqf",[],1,true,true,"",""]; take1.sqf: unit1 addaction ["Test 2","takereb.sqf",[],1,true,true,"","(player distance unit1 <= 3)"]; unit2 addaction ["Test 2","takereb.sqf",[],1,true,true,"","(player distance unit2 <= 3)"]; unit3 addaction ["Test 2","takereb.sqf",[],1,true,true,"","(player distance unit3 <= 3)"]; But my question is how to hide the takereb.sqf from myself if im unit1? So only unit2 will be able to press it on me. Edited March 8, 2014 by mr_shadow Share this post Link to post Share on other sites
KevsNoTrev 44 Posted March 9, 2014 (edited) [b]player [/b]addaction ["Test 2","takereb.sqf",[],1,true,true,"","(player distance unit1 <= 3) && (player == Unit1 && player != Unit2 && Player != Unit3)"]; alternatively [b]player [/b]addaction ["Test 2","takereb.sqf",[],1,true,true,"","(player distance unit1 <= 3) && (player == Unit2 || player == Unit3)"]; - not tested BTW EDIT: another alternative [b]player [/b]addaction ["Test 2","takereb.sqf",[],1,true,true,"","(player distance unit1 <= 3) && (player != Unit1)"]; then repeat for the other units addaction's Edited March 9, 2014 by KevsnoTrev Share this post Link to post Share on other sites
mr_shadow 4 Posted March 9, 2014 Is that possible to make an array if i have 60 units? Share this post Link to post Share on other sites
KevsNoTrev 44 Posted March 9, 2014 easiest way I can think of would be like this as it will guarantee adding to all units. again not tested, but should function. { player addaction ["Test2","takerb.sqf",[],`,true,true,"","(player distance _x <= 3) && (player !=_x)"] } foreach (if ismultiplayer then {playableunits} else {switchableunits}); Share this post Link to post Share on other sites