Jump to content
Sign in to follow this  
tangodelta

How to make AI civillians not run away

Recommended Posts

Hello folks, first time here.

I'm creating a mission in which there is a group of people standing outside the villa on Zargabad, "protesting" against a warlord, and your team of undercover operators has to kill him somehow. I used quotations because they're actually just standing there not doing anything. But that's beside the point.

Whenever I place civillians, they always seem to run away. I got them to not cower in fear from being around other soldiers, but they still seem to run away. Any fix to this? I've tried setting behavior to careless and the waypoint marker I placed on them to HOLD. Still no go.

Also, I have grouped the civillians to blufor so that way the opfor will start shooting at them after a certain amount of time. I know this works, so don't worry about that.

Anyways, hope to hear a reply soon.

Thanks.

Share this post


Link to post
Share on other sites

try

_civgroup [url="https://community.bistudio.com/wiki/allowFleeing"]allowFleeing[/url] 0;

can't say for sure how that works for civilian units but works perfect for armed units.

Share this post


Link to post
Share on other sites

Hey, a reply. I thought this would take a while.

What does the "_civgroup" part mean? Is that a group name? unit name? Also would I have to change it to something else since they're technically not civillians, being grouped to non-present blufor units?

Share this post


Link to post
Share on other sites

"_civgroup" here is just arbitrary choice for variable name, you would use whatever name you have in your script to designate the group or unit which you would set allowFleeing 0.

being grouped with blufor would not make a difference in this regard and if you need it for your script, i can't see anything that would recomend against. Ideally you would use setFriend to avoid eventual unkown showstoppers... check (Side Relations for indepth info)

Share this post


Link to post
Share on other sites

Alright, just got around to testing. It doesn't work, they turn tail and run about 3 seconds after mission start, just like before.

EDIT: Hmm, change of pace. When I change civgroup to "this" and put it in the unit's init field, it seems to work. Thanks though mate.

Edited by tangodelta
New discovery

Share this post


Link to post
Share on other sites

glad you found a way :)

(i suspect the reason it didn't work in the first place was because "civgroup" had not been associated with the unit anywhere, i should have guessed you were on the editor alone)

anyway, enjoy your editing :)

Share this post


Link to post
Share on other sites

This disableAI "MOVE"sould work yes but if they see guns or somting they will still crouch or go prone.

So i suggest to add this too.

Civ init

This disableAI "MOVE"; This setBehaviour "Carreless";[/Code]

Add this to evrey single Civilian.

Edited by Derox

Share this post


Link to post
Share on other sites

It would probably be best to set the Independent side to friendly to both sides, so the civvies will not mind either armed faction, then make the civilians part of Blufor only when the trigger event occurs where the Opfor must start targeting civilians. It would be the most reliable method of getting the AI to behave as needed.

Regards,

Sander

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×