Home   Help Search Login Register  

Author Topic: How to make units retreat under fire?  (Read 5113 times)

0 Members and 1 Guest are viewing this topic.

bdfy1

  • Guest
How to make units retreat under fire?
« on: 13 Apr 2005, 13:03:03 »
I've just ran out of ideas :(
Here quick obseration of my mission :
There are 4 East groups (crew of 3 Urals and btr80 and 3 inf. squads
as Ural's cargo).   They are moving as convoy from Morton in West diresction. But get into ambush on the way and have to retreat out of the road... How do I move them to a certain position for regrouping?
I tried dyn_wp script, doMove, allowfleeing etc - no success :( Units get order to move but continue to combat... I guess disable AI may help but I
need survived unit to fight afterwards.
I also recall  mission with units  retreat : HoldMalden frrom of. campaign 1985. BIS found smart way, but it is rather complicated - I don't think it's easy to copy...
SetWPPos? IIRC it moves certain waypoint. But inf. squads have no WP and I don't know command to create one...
What do you think?
I would upload the mission itself but it contains plenty of russian addons and I can't replace some of them with standart units - for example I can't make BMP move in the head of the convoy ( BTR80 with the same crew does , BMP does not -  poltergeist :))

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:How to make units retreat under fire?
« Reply #1 on: 13 Apr 2005, 13:46:44 »
By 'retreat' I take it you mean flee, rather than withdraw in some sort of order.

As you want them to retreat to and rally at 'a certain point', try giving each cargo group a waypoint at that point and set it accordingly - say: full speed, hold fire, aware.  Make sure they're MoveInCargo'd first.  The groups should sit in the trucks until they come under fire, when they will 'unload in combat' and move to their 'retreat' WP.  After that they can do whatever.

Offline Blanco

  • Former Staff
  • ****
Re:How to make units retreat under fire?
« Reply #2 on: 13 Apr 2005, 14:19:22 »
I just looked at the HoldenMalden mission and I followed the waypoints of the playersgroup. (named nase)
They start with in default behaviour/speed/combatmode only the formation is line instead of wedge. allowfleeing 0 in the init
When they pull back behaviour changes to stealth and allowfleeing become 1. That's all they did. The trigger that execute the retreat is named Zdrhejte!!! (mapgrid Cj75)

But when they flee the tanks are still far away (they just enter a trigger area 200m away from you) and your group doesn't really take fire from bullets or shells, only a few when they hesitate. Most members run like hell.
I think AI will flee faster from tanks because they know they don't take a chance against them.

Now for your convoy situation...
All the retreat scripts I know about need waypoints (Rush-retreat by GB and Fighting retreat by Bremmer)
You are not using waypoints, but you can sort of create them with gamelogics or markers and domove commands...but I don't think that the problem.
When they are under fire in an ambush,danger is pretty close and they need to defend themself first before they can flee. The only way I know about  to make them run without fighting back is

Code: [Select]
"_x allowfleeing 1" foreach units yourgroup;"_x setunitpos ""UP""" foreach units yourgroup; yourgroup setbehaviour "stealth";yourgroup setcombatmode "blue";yourgroup setspeedmode "FULL"
Thing is, how many will survive?
The main problem imo are the vehicles in the convoy. When they got ambushed the drivers drive like drunks, collide with eachother, your men disembark and they pile up behind the vehicle, etc...

I don't think you can compare the holdMalden mission with a convoy situation.
 
Just my 2 cents and good luck  ;)



« Last Edit: 13 Apr 2005, 14:31:36 by Blanco »
Search or search or search before you ask.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:How to make units retreat under fire?
« Reply #3 on: 13 Apr 2005, 14:22:10 »
Groups like waypoints.   They are predisposed to follow them in a way they are not predisposed to follow scripting commands, so start by giving the cargo groups some waypoints.  (How are you getting them out of the wagons btw?)

You can't create waypoints:  you can move them with setWPPos and control which one is active with switch triggers, so you never actually need to create one anyway.   sometimes it's helpful to use "dummy" waypoints in between the real ones, so that you can synchro the triggers to them.

Use engage rather than engage at will:  if they are on engage at will they will constantly try to advance towards the enemy.
Plenty of reviewed ArmA missions for you to play

bdfy1

  • Guest
Re:How to make units retreat under fire?
« Reply #4 on: 13 Apr 2005, 15:33:02 »
OK,I added move waypoints for each group with condition Retreat == 1 (I have an ambash.sqs where Retreat = 1)
Of course, It's a piece of good idea - BIS did almost the same. WP with certain condition, but... I can't say it works fine :( I tested it several times and I do not manage to make units do what I want... The only way to make them retreat is "_x allowFleeing 1" foreach units Gr1... But only OFP engine knows where they will run to...:) Does anybody know how cowardice in OFP works ?
I have GB script - I'll give it a closer look. May be it will match with some adjustments.
And I'm still looking for some examples... Ammolow from Resistance, Plen from Retailation :Peacemaker ... what else ? I didn't play most of english missions thus I hope you will  suggest some

Quote
How are you getting them out of the wagons btw
Get in using trigger like in AmmoLow
Quote
expActiv="""_x moveincargo Truck1"" foreach units Gr1; ""_x moveincargo Truck2"" foreach units Gr2;""_x moveincargo Truck3"" foreach units Gr3";
I guess why I can't load drivers in the similiar way - they assign their places but do not move after mission start...
Get out
 
Quote
"unassignVehicle _x" foreach units Gr1
...
But it is slow... I'm looking for some "quick unload" script.
 

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:How to make units retreat under fire?
« Reply #5 on: 13 Apr 2005, 17:36:10 »
Wow Guys A little to many quotations!
Im guessing you took that out a mission.sqm file, for some wierd reason it adds extra quotations.
Also Instead of making a differant line for every "_x" command you can just do:

Code: [Select]
{_x allowfleeing 1;_x setunitpos "UP";_x setbehaviour "Aware"} Foreach list listname
« Last Edit: 13 Apr 2005, 17:36:19 by RujiK »
I like your approach, lets see your departure.
Download the New Flashlight Script!

bdfy1

  • Guest
Re:How to make units retreat under fire?
« Reply #6 on: 14 Apr 2005, 13:46:10 »
you won't believe it guy but even such a script and some smoke  cover
not always make them retreat...
[Gr1,Gr2,Gr3] exec "fleeing.sqs"
Quote
_total = count _this
_name = 0
#loop
_group = _this select _name
"_x allowFleeing 1" foreach units _group
_group setFormation "LINE"
"_x setUnitPos ""Up""" foreach units _group
"_x setSpeedMode  ""Full""" foreach units _group
_group setcombatmode "blue"
_group setbehaviour "stealth"
?(_name == _total):exit
_name = _name + 1
goto "loop"
A also tried set enemy combatmode to "blue" - they all keep fighting...
I guess I need some kind of "disengage" command , but I can't find one in comref :(
Can enebody provide a working retreat example ? These f*ckin' heros are making me crazy...  

 
« Last Edit: 14 Apr 2005, 13:47:16 by bdfy1 »

Offline Blanco

  • Former Staff
  • ****
Re:How to make units retreat under fire?
« Reply #7 on: 14 Apr 2005, 20:10:26 »
Just an idea...

Reduce their skill for a moment with the setskill command.
Search or search or search before you ask.

Offline 456820

  • Contributing Member
  • **
Re:How to make units retreat under fire?
« Reply #8 on: 22 Apr 2005, 18:23:36 »
to make them retreat have a trigger with condition : running
and in all the units init field add an event handler hit and have when thats have it make running = true and synq the trigger with a waypoint where you expect them to be shot then make a new waypoint where ytou want them to retreat to (trigger must be switch)

Merc

  • Guest
Re:How to make units retreat under fire?
« Reply #9 on: 29 Apr 2005, 23:37:17 »
i was just reading what everyone else said and got an idea.

bdfy 1 said that the AI randomly fleed right? so let then flee with "allowfleeing 1" for x amout of time. then set it back so they can't flee, "allowfleeing 0", and have them "domove" to a central location. the only factor that you would need is how much time to let them flee.

:gunman:                                        :help:

bdfy1

  • Guest
Re:How to make units retreat under fire?
« Reply #10 on: 01 May 2005, 09:20:28 »
I guess the main problem was: I didn't choose right place for my mission :(
First  I made ambush at Dd55 on Everon. I want units to run to the northern forest while  enemy Mg's fired from up the hill. Convoy just have n chance to flee in such a way : they could only destroy all rebels or try to run southwards :) That's exactly what AI tried to do all the time - it's very smart :)
Then I moved mission  to Gg73. Rebels are on the east side at the edge of forest - death fight again, no chance to flee towards west forest :)
I tried smoke , "Blue" and stealth modes , but yesterday I found dispersion script - I hope it will help ( now I can't finish mission :()
Can anyone suggest suitable place for my mission ? I prefer Everon , but do not mind against other islands - may be some  user-made ones , not BIS's ones , not large ( big Islands like Nogova are too laggy on slow machines )
 

Offline diegovet

  • Members
  • *
Re: How to make units retreat under fire?
« Reply #11 on: 20 Feb 2011, 06:47:31 »
Hi guys!
 I'm making my mission and I have the same problem, I'm very frustrated because the enemiy flees in random and to random places. I'm very stupid with scripts and I need your help!
Step by step, nothing is obvious for me, could you explain for dummies, how to make 7 groups attack a position and after an X number of kills they retreat?
Also for my side where I have several groups as well, how can I set up the things to see my men fleeing to a certain position in the map?
To be more realistic, I'd love to see surrender and drop weapons as I saw in an old script but : I CANNOT MAKE IT WORK!!!!!!

thank you and sorry for my frustration, I invested hours..days in this crap!

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: How to make units retreat under fire?
« Reply #12 on: 20 Feb 2011, 13:32:02 »
Well, I Think this should work, and if this doesn't work... feel free ask  :D

1. Place a group of soldiers, "Anybody" (I chose East Side) Now Yuo must to give the waypoints. You must to put a waypoint in the village, and another where you want.....

2. Place a trigger and configured it.... this are the paremeters:

Activation : East
Type : Switch
Condition :
Code: [Select]
(Count thislist) <10 Modify the above procedure as needed.

3. synchronize (F5) the trigger with the first waypoint, Now when the east side have 9 soldiers or fewer, the soldiers will move to the second waypoint.

Modify the above procedure as needed.

Well, I don't know What Script have you been viewing? but Here's a Surrender script.

Hope that helps...

Regards,
Aldo
« Last Edit: 20 Feb 2011, 17:29:27 by Aldo15 »
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline diegovet

  • Members
  • *
Re: How to make units retreat under fire?
« Reply #13 on: 20 Feb 2011, 17:04:54 »
Thank you Aldo! I'll try your suggestion. I forgot to mention that I'm playing with ARMA, I don't know if makes a difference with OFP. I've been trying something similar as posted above but didn't work.
The BArron surrender script looks awsome and I've been trying to make it work..but I couldn't I'm really stupid  :weeping: !!!
I don't know what I'm doing wrong. in tht script I have to put a surrender chance but the editor does not accept that command, so I don'y know how to proceed.
I'll let you know about your suggestion.
Well: I used a trigger set up posted by laggy and works!!! with Aldo's command suggestion:
Setup:
All editor placed (triggers and units).

Trigger #1 - BLUFOR present, repeatedly, named badguys.

Trigger #2 - OPFOR present, repeatedly,  count list goodguys > count list 20
OnAct: switch
I did work!

« Last Edit: 21 Feb 2011, 02:50:28 by diegovet »