LoOni3r 6 Posted October 3, 2019 Hello everybody, Is there a command that prohibits the shooting of a single AI on the player? I am currently working with Captive. This unfortunately affects all opponents. doWatch that would be a possibility. Unfortunately, the AI shoots again by itself. many thanks for your help. Share this post Link to post Share on other sites
Stormmy1950 41 Posted October 3, 2019 try this _soldier setBehaviour "CARELESS"; also check this link: https://community.bistudio.com/wiki/setBehaviour Share this post Link to post Share on other sites
LoOni3r 6 Posted October 3, 2019 Thank you for your answer. setBehaviour does not solve my problem.. The unit should not completely stop firing if other players are nearby. Share this post Link to post Share on other sites
Stormmy1950 41 Posted October 3, 2019 then try this https://community.bistudio.com/wiki/disableAI Share this post Link to post Share on other sites
LoOni3r 6 Posted October 3, 2019 no, it affects all targets. The unit should stop the fire on a particular player and continue to fire at other players Share this post Link to post Share on other sites
Stormmy1950 41 Posted October 3, 2019 ok i think you have a couple of options then 1. you can swich side of the unit to civilian 2. you can set unit capture put this in initfield of unit: this setCaptive true; and when you want to undo the captive put this : this setCaptive false; Share this post Link to post Share on other sites
beno_83au 1362 Posted October 3, 2019 I think the only way this may be possible is to move the AI in question into their own group and run a loop that uses https://community.bistudio.com/wiki/forgetTarget to "hide" the player. Might take some experimenting to get an acceptable outcome. 2 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted October 3, 2019 2 hours ago, LoOni3r said: The unit should stop the fire on a particular player and continue to fire at other players Hello there Guys ! You could change the certain player's side instead. Share this post Link to post Share on other sites
LoOni3r 6 Posted October 3, 2019 change player side == captive -> undesirable forgetTarget in loop It will probably be if I can not solve it otherwise Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted October 3, 2019 1 minute ago, LoOni3r said: change player side == captive -> undesirable To be honest i don't get it , but as you said you don't want the ai to shoot a certain player, so it's possible to change the side only for this player. 1 Share this post Link to post Share on other sites
wogz187 1085 Posted October 3, 2019 That's this. I'm not sure if it was properly resolved. I like @GEORGE FLOROS GR's idea of just changing the unit's side. 1 Share this post Link to post Share on other sites
LoOni3r 6 Posted October 4, 2019 [_x]spawn{ for "_i" from 1 to 29 do { _this select 0 doWatch objNull; sleep 0.05; }; }; works well unfortunately a dirty solution. had hoped for a true / false function that would stop the fire on a particular player. 1 Share this post Link to post Share on other sites
pierremgi 4736 Posted October 5, 2019 As Beno_83AU wrote: forgetTarget . That's the solution for your specific case. 3 Share this post Link to post Share on other sites