matteo1944 10 Posted July 20, 2015 How do I keep units in certain area without advancing or retreating(maybe retreating after suffering heavy casualties),via triger? or waypoint? lets say they have to hold a city,but as soon as they spot enemy they run towards it... Share this post Link to post Share on other sites
beno_83au 1362 Posted July 21, 2015 Well, using forceSpeed will allow you to prevent them from moving around while still allowing them to turn to engage targets not to their direct front. Then maybe a condition in a trigger to check for when they've only got X amount of guys left before using move or something? You've given a pretty broad explanation, it sounds like you're not sure what you want the mission to be about. If you explained it better it'd be easier to help. Share this post Link to post Share on other sites
matteo1944 10 Posted July 21, 2015 My guys are holding crossroads(I44 mod) and I dont want them to charge the enemy as soon as they spot them,I want them to remain in certain area from which they will defend mentioned crossroads,and eventually fall back to secondary position if they are overrun. Share this post Link to post Share on other sites
beno_83au 1362 Posted July 21, 2015 Ok, that's a bit more clear. If you want the guys defending to hold their positions (e.g. behind cover) you can use: _unit forceSpeed 0; This way they can be grouped into sections/teams and they'll remain where you put them. To reset them to their default just use a negative value with forceSpeed: _unit forceSpeed -1; If, for example, you have a group of 12 and you want them to withdraw after taking 50% casualties, just name your group (lets use grp1), create a marker called secPos where you want the secondary position to be, then place a trigger and use: Condition: (count units grp1) <= 6 This will activate the trigger when there is 6 or less units remaining in grp1. On Act: {_x forceSpeed -1} forEach units grp1; {_x doMove (getMarkerPos "secPos")} forEach units grp1; This will reset the forceSpeed for everyone in grp1 and then give them a waypoint at the position of the secPos marker. If you wanted to have them withdraw once the enemy (again, I'm assuming OpFor) are within a certain range of your position, use a trigger with the same On Activation field, but use this in the Condition field, and set it to be activated by OpFor and adjust the trigger's size as you need. There's a few other ways of doing this, depending on what you're doing/how many units or groups you have, but taking a few guesses with what you've said this may help you. Share this post Link to post Share on other sites
matteo1944 10 Posted July 21, 2015 Thanks beno,will try this later today! Share this post Link to post Share on other sites