Spriterfight 10 Posted October 4, 2021 i want a script that checks if the unit is in formation ,when a unit is is ready they say ready to fire,is there a way to check this when they say that? Share this post Link to post Share on other sites
Ibragim A 163 Posted October 4, 2021 Try this to check if unit is following his formation: _isInFormation = (expectedDestination _unit select 1) isEqualTo "DoNotPlanFormation"; You can check overall "Ready" status by using: _isReady = unitReady _unit; 1 1 Share this post Link to post Share on other sites
opusfmspol 282 Posted October 4, 2021 unitReady page doesn't reflect its locality, but be aware it should be run where the unit being checked is local. My own testing in the past showed the unitReady command only gave an accurate return on the machine where the unit was local. When the command was run on a machine where the unit was not local, it always returned true, regardless whether the unit was ready or not ready. And that caused scripts and fsm's which were relying on it to jump the gun, advancing instead of waiting. 1 Share this post Link to post Share on other sites
Ibragim A 163 Posted October 4, 2021 1 hour ago, Spriterfight said: i want a script that checks if the unit is in formation ,when a unit is is ready they say ready to fire,is there a way to check this when they say that? By the way, notice that the words "Ready to fire" do not mean that the unit follows the formation. Units say this when their combat mode prohibits them from opening fire (blue, green and white combat modes). 2 Share this post Link to post Share on other sites
Spriterfight 10 Posted October 4, 2021 34 minutes ago, opusfmspol said: unitReady page doesn't reflect its locality, but be aware it should be run where the unit being checked is local. My own testing in the past showed the unitReady command only gave an accurate return on the machine where the unit was local. When the command was run on a machine where the unit was not local, it always returned true, regardless whether the unit was ready or not ready. And that caused scripts and fsm's which were relying on it to jump the gun, advancing instead of waiting. When does ready fires actually?When a unit is at his position? Share this post Link to post Share on other sites
opusfmspol 282 Posted October 5, 2021 I don't know the exact answer to that. I suspect the behavior is controlled by internally used .fsm's, but could be wrong. From observation, they report "Ready" when a command is given and they complete the command. (Or maybe a better way to say it is that an action gets commanded, and they complete the action, because not every command will provoke a response of "Ready" from them.) They report "Ready to fire" when restricted from firing, but are given a target and they have acquired the target in their sights (regardless whether they are in formation). Share this post Link to post Share on other sites