Jump to content
Sign in to follow this  
kromka

Squad sitting around fire.

Recommended Posts

Hello.

I need to place whole group in "sit" position around camp fire.

I know that i have to set them behaviour to "safe" and sit them in forEach loop, but problem is that they allways stays in formation. Even if i will place whole group around the fire manually in editor, they start into "wedge" formation.

I know that i can disableAI "MOVE", or "ANIM", but then i don't know how to force them to stand and fight if enemy presence is revealed.

Have anybody any idea how to solve it?

Best regards.

Share this post


Link to post
Share on other sites

First to avoid formation: For each unit, just by their rank and name field, set their 'Special:' to None. This will make them start where you put them.

To make them get up upon enemy detected you could make a 'X detected by Y'-trigger with a bit tweaked condition-field. Let's say your group has been named sitGroup with sitGroup = group this; in the leader's init-field.

Trigger condition:

this || behaviour leader sitGroup == "COMBAT"

This would make it so that if enemies are detected within the trigger radius, or the group enters combat mode for some reason, you can use the On Activation to break them out of their sitting.

If you for example have a script running that forces the group to sit down (in this case it is easiest with one script forcing all group members to sit, rather than one script per group member), just make sure it has a named handle (like for example forceSit = [group this] execVM "forceSit.sqf"; in the group leader's init) and you can use terminate forceSit; in the trigger to stop the script from running.

Example On Activation field:

terminate forceSit; {_x enableAI "MOVE"; _x enableAI "ANIM";} forEach units sitGroup;

Edited by Inkompetent

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  

×