Home   Help Search Login Register  

Author Topic: Making "waiting" units not be "waiting"  (Read 812 times)

0 Members and 2 Guests are viewing this topic.

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Making "waiting" units not be "waiting"
« on: 13 Aug 2005, 21:25:32 »
If you command units in your squad to "wait for me" (Command menu 1-7), then the only way they will move is if you command them to "rejoin formation" (command menu 1-1).  Is there a way to also do it from a script?  I want the men to respond and move to an area at a certain moment (not controlled by the player), but if it so happens that the player has commanded any men to "wait" those units do not move when the event occurs.  If they are "waiting" no move or domove commands will inpire them to move. :-[ I know I could have them leave the player's group, but I really do not want them to do that, it makes the event too awkward.  Any help is much appreciated.
« Last Edit: 13 Aug 2005, 21:26:20 by Raptorsaurus »

DoDgY

  • Guest
Re:Making "waiting" units not be "waiting"
« Reply #1 on: 13 Aug 2005, 21:39:27 »
Maybe this? http://www.ofpec.com/publicfiles/files/tutorials/CMDREFv104.htm#CommandFollow

I suggest making them return to formation, but before they do make them domove after a short amount of time? :)
« Last Edit: 13 Aug 2005, 21:41:11 by DoDgY »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Making "waiting" units not be "waiting"
« Reply #2 on: 13 Aug 2005, 22:28:56 »
maybe this will do the trick

dostop unit
unit domove getpos player

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Making "waiting" units not be "waiting"
« Reply #3 on: 14 Aug 2005, 10:10:10 »
Quote
Maybe this? http://www.ofpec.com/publicfiles/files/tutorials/CMDREFv104.htm#CommandFollow
I tried the CommandFollow command to no avail.  It will make "ready" units fall into formation, but it will not make "waiting" or "stopped" units fall into formation.

Quote
I suggest making them return to formation, but before they do make them domove after a short amount of time?

I want the units to move automatically when an event occurs.  The event is beyond the player's control, and occurs unexpectedly, so it would not work right if the player had to command the units to return to formation before the event occured (the player will not know ahead of time, so if he happens to have some units that he has told to "wait for me" then the whole effect will be ruined).

Quote
maybe this will do the trick

dostop unit
unit domove getpos player
I alread tried this.  They stay waiting and stopped units remain stopped.  The domove will move a unit stopped by the dostop command, but it will not move a unit stopped by the player issued stop command (command menu 1-6).  Also, the dostop command does not "over-right" or "supplant" the stopped or waiting state as isssue by player ingame command menu.

Thanks for the suggestion though.

This method works, but it also eliminates the waypoints:
Code: [Select]
_men = units group player
[player] join grpNull
_men join player

« Last Edit: 14 Aug 2005, 10:35:50 by Raptorsaurus »

DoDgY

  • Guest
Re:Making "waiting" units not be "waiting"
« Reply #4 on: 14 Aug 2005, 11:25:09 »
Quote
I want the units to move automatically when an event occurs.  The event is beyond the player's control, and occurs unexpectedly, so it would not work right if the player had to command the units to return to formation before the event occured (the player will not know ahead of time, so if he happens to have some units that he has told to "wait for me" then the whole effect will be ruined).

Yeah, I mean in a script so it is beyond the players control :). In the script force the player to command it without him actually pressing 1-1. Can be done?

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Making "waiting" units not be "waiting"
« Reply #5 on: 14 Aug 2005, 17:32:08 »
No, unfortunately it cannot be done (at least not using commandFollow, or any other related command).  I have tried every command related to moving and following and none will override a player issued wait or stop order (1-7 or 1-6).  The "trick" where you make the player join grpNull, then make his units join him is the only thing I have found to work. I was just hoping tha someone had a "trick" that did not make the waypoints become lost.  I even tried making a temp units to maintain the waypoints, but when I "rotate/sort" the men back the to group (being held in existance with the "temp unit" he maintains not only the waypoints, but the WAIT status also!!!  So the men end up waiting again!!!  OH, this is so frustrating!!!!  Anyway,  maybe I will just make it so even cadets get no waypoints and be done with it.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Making "waiting" units not be "waiting"
« Reply #6 on: 16 Aug 2005, 06:58:14 »
Try: "_x dofollow (leader _x)" foreach units group

That'll make all units in group rejoin formation, and the leader of the group will move through their waypoints (if they have any) ;)