Home   Help Search Login Register  

Author Topic: Ordering a retreat (should be simple for you vets)  (Read 1220 times)

0 Members and 1 Guest are viewing this topic.

Javito

  • Guest
Ordering a retreat (should be simple for you vets)
« on: 08 Aug 2006, 03:59:22 »
Okay, making a little mission with Lib '41 and I'm giving the player the option to retreat if he/she deems all is lost. Now there are some complex movement orders going on at times so I can't just set a waypoint.

So here's my thought. I've named all the units that would be doing the retreating. I'm thinking I could create a trigger activated by radio delta and in the "On Activation" field enter commands to each unit such as "stand up" "full speed" "move to such and such place". I'm also thinking that I can just place a Game Logic marker a few hundred kilometers back and mark that the spot they will retreat to. So in the activation field the command would be something like "soldier1 move to blank" where blank is the name of the game logic marker in the rear.

Only trouble is I don't know the proper commands to do this with. I know soldier1 setunitpos "Up" but I do not know the command to set their speed to Full (though I assume it's something similar). And I also would like to know the command to make a unit move to a certain game logic.

Also, it is my understanding that if I give them the order to move to a game logic in the rear, all of the units given the command will stop whatever movement waypoint they're following at that point and move to the game logic. Am I right in this?

Offline Pr0ph3t

  • Members
  • *
Re: Ordering a retreat (should be simple for you vets)
« Reply #1 on: 08 Aug 2006, 05:49:09 »
You want to make them retreat?! I have enough trouble getting them to rush into battle and STAY there! I'm quite sure though that when the AI feels overwhelmed it retreats on its own, you'll notice you can assign the command ALLOWFLEE=TRUE/FALSE check it up in the command ref.

As for the game logic thing, yeah they should drop what they're doing and start following it, but I don't think its as simple as that, its been a while since I've done this stuff, but soon we should be able to help eachother out as my campaign devellops. I'll check this out since I'll probably be using something like that myself

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: Ordering a retreat (should be simple for you vets)
« Reply #2 on: 08 Aug 2006, 10:02:56 »
Probably your best bet is to give a move command to the group leaders.   Their men will follow.   If you want to give orders to individual loons, use doMove.     

leader grp1 move getPos object 1234

You can use a gamelogic instead of an object on the map, but a bush will do fine and means you don't need the GL.   Syntax not guaranteed.

You don't want setUnitPos up or full speed commands - retreating groups should still move tactically.  You might need to allowFleeing 0 to give them the courage to retreat.   If you want a rout then just use allowFleeing 1.   Note that full speed is a group property, not one of individual loons.

You are right that a move or domove command will trump a waypoint.    However, once they have completed the command they may start moving to the waypoint - can't remember, test it.
Plenty of reviewed ArmA missions for you to play

Javito

  • Guest
Re: Ordering a retreat (should be simple for you vets)
« Reply #3 on: 08 Aug 2006, 21:18:55 »
Here's the problem. That method works fine as long as the original leader is still alive. From my testing it seems to me that if he dies the rest won't move to whatever object I assign to them. Is there a command to order a specific group to move regardless of who the leader is? Since I'm simulating a rout in the middle of a battle, the leader is usually long dead by the time the retreat order is given.

While I'm on the subject I'd like these guys to -really- break and flee for their lives. Curious how I can set an entire group to hold their fire so they can just run like mad?

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re: Ordering a retreat (should be simple for you vets)
« Reply #4 on: 08 Aug 2006, 22:44:49 »
Try kicking the units out of the group with grpNull once they are dead, and see if that helps.

Into initialization field of the units:

Code: [Select]
this addEventHandler ["killed", {[_this select 0] join grpNull}]
Dunno if that helps, but try it.

Javito

  • Guest
Re: Ordering a retreat (should be simple for you vets)
« Reply #5 on: 08 Aug 2006, 23:37:56 »
Actually that did help. Thank you very much. I'm almost there now, just one last little problem.

I have two groups of 3 Russian soldiers in this test. In my trigger's condition I have East countSide (units ruski) < 3 AND East countSide (units ruski2) < 3 and in the activation leader ruski move getPos retreat ; leader ruski2 move getPos retreat. The intention is that for both groups to retreat AFTER they both have less than three men left.

Unfortunately these commands do not work. I believe the trouble is in the condition field because I made a typo earlier and put Ruski in both parts of the condition field, and Ruski2 ran as ordered. But I would like them not to retreat until BOTH groups have less than 3 men. As of this instant neither group is running even after both have less than 3. I'm probably not using the right command.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Ordering a retreat (should be simple for you vets)
« Reply #6 on: 08 Aug 2006, 23:52:48 »
Code: [Select]
(({alive _x} count units ruski) < 3) AND (({alive _x} count units ruski2) < 3)
note the brackets (). it's good practice to enclose discreet parts of your conditions so that flashpoint is in no doubt what belongs together.

Javito

  • Guest
Re: Ordering a retreat (should be simple for you vets)
« Reply #7 on: 09 Aug 2006, 02:47:18 »
Bingo! Thanks very much, all of you helped me tremendously.
« Last Edit: 09 Aug 2006, 02:51:49 by Javito1986 »