AZCoder 921 Posted August 30, 2016 The disableAI command does not seem to work with civilians. In short, I have put 3 civs into a vehicle. This code is executed: { _x allowFleeing 0; _x disableAI "ALL"; } forEach [dude1,dude2,dude3]; Before using "ALL" I had tried all the usual, like "FSM" and "MOVE". On the other side of the hills there is a battle raging. The civs are in absolutely no danger at all, they can't even see the fighting, too many trees and obstacles. But as soon as the first shots are fired, at least 1 civ will exit the vehicle, then the other, and eventually the driver will drive off, or get out and run away. Conversely if I put 3 soldiers into the vehicle, they sit there as expected. I tested this purely vanilla on Tanoa, so it's not mod related. I could of course use soldiers and put civilian clothes on them, or potentially disable simulation. Is this is a known bug, or has it ever worked for civs? I have failed to find anything on it, which is why I am asking. Share this post Link to post Share on other sites
AZCoder 921 Posted August 31, 2016 To update, disableAI "ALL" is apparently for v1.65, so it would not have worked anyway. I am using this to discourage the AI from wandering off (although it only partially works): Apparently the forum eats any text you type after code blocks. So I had written that I was wrong earlier, even soldiers will ignore the code below and flee. My solution was to write a while loop that checks if anyone starts to exit the vehicle, then it issues the commands again and moves the offending AI back into the car. { _x allowFleeing 0; _x disableAI "MOVE"; _x disableAI "FSM"; _x disableAI "TARGET"; _x disableAI "AUTOTARGET"; } forEach _civs; Share this post Link to post Share on other sites
f2k sel 164 Posted August 31, 2016 It used to be an issue in the past keeping CIV AI inside a vehicle but it seems ok to me now if I just use a "careless" waypoint, they ignore the soldiers and just drive past. I have in the past used the getout eventhandler to just put them back in the vehicle if they try to get out. Share this post Link to post Share on other sites
AZCoder 921 Posted August 31, 2016 Both are very good ideas, thank you. I will add them into my scripts. This is for a cutscene and I want everyone in their place! LOL Share this post Link to post Share on other sites
Tajin 348 Posted August 31, 2016 You could also lock the vehicle to stop them from getting out in the first place. Share this post Link to post Share on other sites
jstibbsy 54 Posted August 31, 2016 Ai ignore that vehicles are locked Share this post Link to post Share on other sites
Tajin 348 Posted August 31, 2016 They shouldn't ignore it if you use: this lock 2; Share this post Link to post Share on other sites
johnnyboy 3743 Posted August 31, 2016 setUnloadInCombat might help also Share this post Link to post Share on other sites
AZCoder 921 Posted August 31, 2016 They absolutely ignore lock 2. If anyone wants to see it in action, I put a sample simple mission on Tanoa here http://www.azcoder.com/arma3/civ_test.Tanoa.zip Just run it and speed up time (unless you're really patient). After a few booms, the 2 passengers will usually get out. If you uncomment the setBehavior and setCombatMode lines in the init.sqf file, they will usually stay in the vehicle. Not always. Now, I do have a working solution using a loop. But I wanted to bring this up because I thought disabling FSM and MOVE would stop this sort of thing. In my case I'm actually dealing with civs who are even more likely to flee, despite allowFleeing 0. I also thought lock 2 would work, but sadly no. I don't think this was a problem prior to Apex, but I could be wrong. Anyway, I have it working well enough for my purposes. And thanks for all the input. Share this post Link to post Share on other sites
f2k sel 164 Posted September 1, 2016 DisableAI "move" has never worked for me when they're in a vehicle. I just used behavior "careless" instead of "safe" and they didn't get out in 10 attempts. You do still need to disable "target" ect or they raise their weapons" It seems when in "safe" mode they switch to "aware" when alerted but in "careless" they still remain in "careless" 1 Share this post Link to post Share on other sites