Jblack 0 Posted February 19, 2007 I notice that when i make big missions, using multiple AI squads under AI control, that if they take heavy losses or lose their transport or support vehicle, the squad will stop, even retreat. Is there something I can type in the Leaders init line to prevent this from happening, I want these AI squads to charge on their objective to the LAST MAN! Thanks Share this post Link to post Share on other sites
Timblesink 0 Posted February 19, 2007 Back in good old OFP I'm pretty sure it was "this allowfleeing = 0", but I'm not so sure about ArmA. Try it out and see. Also, I'm not sure but you might be able to use "group this allowfleeing = 0" to make the group not run for it. Not totally sure about any of this though so just mess around with it :P Share this post Link to post Share on other sites
NeMeSiS 11 Posted February 19, 2007 Back in good old OFP I'm pretty sure it was "this allowfleeing = 0", but I'm not so sure about ArmA. Try it out and see. Also, I'm not sure but you might be able to use "group this allowfleeing = 0" to make the group not run for it. Not totally sure about any of this though so just mess around with it :P I think it was This allowfleeing 0 EDIT: link Share this post Link to post Share on other sites
Jblack 0 Posted February 20, 2007 thanks guys, so in the leaders line I should put group this allowfleeing = 0 Somebody please confirm, Thanks! Share this post Link to post Share on other sites
NeMeSiS 11 Posted February 20, 2007 I think its something like "_x allowfleeing 0" foreach group this Share this post Link to post Share on other sites
Jblack 0 Posted February 20, 2007 "_x allowfleeing 0" foreach group this Should I put this in the leader init line? Should something go in place of _x? sorry guys my experience with editing is limited.. Share this post Link to post Share on other sites
NeMeSiS 11 Posted February 20, 2007 Just copy and paste it into the leaders init line (other group members work probably as well) Im not sure if it works, 'foreach' always confuses me, and you dont have to change anything about the _x. Share this post Link to post Share on other sites
celery 8 Posted February 20, 2007 Maybe "_x allowfleeing 0" foreach thislist in an area trigger would do the job quicker? Not sure if it works though. Share this post Link to post Share on other sites
Wolfrug 0 Posted February 20, 2007 AFAIK, the leader determines the "allowfleeing" status of the entire group, ergo you should only really need to "allowflee" him (put this allowfleeing 0 in each enemy squadleader's init field.) I poked around the Biki this evening and found they've tweaked the setSkill command as well (Link). Apparently you can now change individual things in the AI's skill, like their endurance, accuracy or, as it says, courage. I haven't tested this any more, and I'm suspecting both Super AI and customized skill ratings in the difficulty tab will override anything you put in here, but it might be worth a shot. Try <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this SetSkill ["Courage", 1] in the init field of the squad leaders as well and see if that helps any. Good luck! /Wolfrug Share this post Link to post Share on other sites
Jblack 0 Posted February 20, 2007 Thanks Wolf, but your post was confusing a little bit, It's the allied squads I'm complaining about retreating So if i follow your instructions, in the allied squad leaders init line, I should put: this allowfleeing 0 or should I just put: allowfleeing 0 or should i just put both:"_x allowfleeing 0" foreach group this and allowfleeing 0? Sorry guys this editing stuff has always been confusing you guys are helping so much Thanks! Share this post Link to post Share on other sites
hoz 0 Posted February 20, 2007 If your going to use <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> "_x allowfleeing 0" foreach group this In ArmA it needs to look like this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {_x allowfleeing 0} foreach group this Share this post Link to post Share on other sites
Jblack 0 Posted February 20, 2007 thanks Hoz! and I assume i put this in the squad leaders init line? I assume that this code will work? if so, thanks! Share this post Link to post Share on other sites
Jblack 0 Posted February 20, 2007 This code will continue to work if the leader with this in his init line gets killed correct? Share this post Link to post Share on other sites
NeMeSiS 11 Posted February 20, 2007 This code will continue to work if the leader with this in his init line gets killed correct? {_x allowfleeing 0} foreach group this Keeps working (it basically sets 'this allowfleeing 0' for each group member this allowfleeing 0 doesnt, it only sets it for the person you wrote it for. Share this post Link to post Share on other sites
kenjara 0 Posted February 20, 2007 Hey guys im just wondering what does the _x mean in the statement? Share this post Link to post Share on other sites
hoz 0 Posted February 20, 2007 The _x is a reserved variable and is presented foreach unit in the thislist. The idea is that the code part {} will run each time for each unit in thislist. Share this post Link to post Share on other sites
kenjara 0 Posted February 20, 2007 Ah thanks! So its like a loop that runs through the whole unit where x will be each member of the unit. Share this post Link to post Share on other sites
mattxr 9 Posted February 20, 2007 If your going to use <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> "_x allowfleeing 0" foreach group this In ArmA it needs to look like this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {_x allowfleeing 0} foreach group this that doesnt work, just tried it.. you need Quote[/b] ]{_x allowfleeing 0} foreach units group this Share this post Link to post Share on other sites
Mike31 0 Posted February 20, 2007 How did you get multiple squads in AI control? Share this post Link to post Share on other sites