Home   Help Search Login Register  

Author Topic: Use tank as cover whil inf advances  (Read 2837 times)

0 Members and 1 Guest are viewing this topic.

Offline Barbolani

  • Members
  • *
Use tank as cover whil inf advances
« on: 21 Jan 2011, 20:57:54 »
Hello all!!!

I'm trying to simulate an assault where the inf attackers use tanks running behind them. This is a typical tactic used to cover against light weapons fire.

I used Hoz follow script, and works fine, except the problem comes when the tank detects enemies. Then it accelerates and goes after the infantry without waiting for the inf.

I tried disablingAI for the tank, but nothing different happened. Tank engages at full speed (even with a limited speed waypoint)

At some point tanks will drop smoke (solved) and infantry engages with different formations.

The "place one hundered waypoints and syncronize" techinque is useless too, causes lots of problemas and, of course is a pain in the ass...

I suppose attach is not the solution too...

Ideas?

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Use tank as cover whil inf advances
« Reply #1 on: 22 Jan 2011, 13:51:14 »
Try placing empty armor units. Place a single crew member in his own group and have him move in as gunner. You can then have the commander and driver in the same group but have the behavior set to safe>>never fire. The gunner will engage targets he sees but the driver will remain at constant speed. You could also group all tank gunners together so that they share enemy info and when they get so far apart, have them join their own group so that they fire independently. Or just group the tank gunner with the infantry group leader so that he shares info with that group so long as the infantry and tank stay together. If you enter urban terrain, join the tank driver and commander to the infantry group leader and they should stay in formation. If you join them to the infantry group leader to soon, the leader will run ahead of the tank.
« Last Edit: 22 Jan 2011, 13:56:05 by savedbygrace »

Offline Barbolani

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #2 on: 23 Jan 2011, 01:31:32 »
Thanks saved!!!

But no success, tank still engages

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Use tank as cover whil inf advances
« Reply #3 on: 23 Jan 2011, 09:04:13 »
Interesting. I tested this and it worked fine for me. I had 8 tanks advancing on Fallujah each with 8 infantry in compact column behind. The tank gunners were engaging left and right while the drivers slowly and steadily advanced.

Perhaps you misunderstood this segment of text.
Quote
Place a single crew member in his own group and have him move in as gunner. You can then have the commander and driver in the same group but have the behavior set to safe>>never fire
because it was misleading as I read it a second time.

The way I did it was place the infantry group behind the tank, place a single unit as the driver, placed a single unit as the gunner. I then joined the driver to the infantry group and moved the leader of the infantry group into the tank as the commander. That forced the driver to keep the tank with the infantry, with the limited and never fire commands. The fail of this is that the infantry do not engage contacts within their range. You could of course eject the commander from the tank and have the driver join the gunner once the group gest to where you need them to engage.

A workaround would be to have a single unit running behind the tank as support which would keep the tank together with the infantry. You could then continuously order the infantry group to follow the lone soldier that's grouped to the tank, they would engage as needed as would the tank gunner(in his own group) and the driver would maintain a steady haul with the lone infantry in tow. Once you need them to engage, join the driver and gunner together and then join the lone ranger to the rest of the group.

Offline Barbolani

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #4 on: 23 Jan 2011, 21:31:01 »
Saved, you mean you are using just waypoints, no Hoz script or whatever, no? Just placing different waypoints for gunner, commender and / or the infantry group. Isn't it?

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Use tank as cover whil inf advances
« Reply #5 on: 23 Jan 2011, 22:20:14 »
Yes.
The gunner will have no waypoint, he just reacts as default behavior is aware.

The driver follows the commanders waypoints and in this case, the infantry group leader which is set to safe, limited, never fire.

To have the infantry group follow the lone soldier behind the tank, place a trigger set to repeatedly with
Code: [Select]
leader followingGroupName distance LoneRanger > 5 in the condition field(Untested). In the OnActivation field insert...
Code: [Select]
leader followingGroupName domove getpos LoneRanger Triggers are checked every .5 seconds and so the trigger should keep the group close to the tank. To break the trigger, you could add another condition check such as leader followingGroupName distance frontline > 50 so that the condition field would look like...
Code: [Select]
(leader followingGroupName distance LoneRanger > 5) AND (leader followingGroupName distance frontline > 50) This would keep the group close to the tank for as long as they are more than 50 meters away from the object,named frontline. Once they are at 50 or less, they will stop following the tank.

Waypoint parameters can be changed at anytime with scripts,triggers or additional waypoints of the same group or any other group. Once you join the driver and gunner you could add waypoints to that group and adjust all necessary parameters such as setwaypointbehaviour, setwaypointcombatmodeand ten other waypoint commands to choose from.

You could control the group via script using setbehavior, setformation, setcombatmode, setspeedmode, setunitpos, setdir, domove, dostop, move, etc. commands. The possibilities are only limited to your creativity.
« Last Edit: 23 Jan 2011, 22:34:35 by savedbygrace »

Offline Barbolani

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #6 on: 24 Jan 2011, 17:46:36 »
Thanks saved.

For sure that works, and my poor script skills are able to do something scriptable with that. But there's another issue.

Make the tank not going too fast. Tanks going on "LIMITED" speed, AFAIK are faster than infantry units. And I want the inf engaging while moves (that's more realistic, even if the AI looses the cover for the engaging)

I could place a lot of waypoints for the driver / commander and on condition place one of those formulas regarding distance.

But a good way could be a trigger / script that checks the distance, and if it is more than x, stop the tank.

The problem, I guess is, how to stop it. I mean, DoStop will work on an engaged - safe mode driver? (I think not)

And a setvelocity (kinda MandoHeliroute) could be a very very complex formula.. far from my math knowledge, I'm a lawyer :), if you don't want a completeley unrealistic setvelocity [0,0,0]

Letme try all this and report you.

And again: Thanks!!!

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Use tank as cover whil inf advances
« Reply #7 on: 24 Jan 2011, 20:34:23 »
If dostop fails, something as wicked as setfuel 0 would certainly stop that hulk.  ;) Then setfuel 1 when distance met. Sort of sloppy workaround but it would work.

Offline Barbolani

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #8 on: 24 Jan 2011, 21:04:31 »
Uhm, still finding trouble.

First: A domove tank commander is not enough, because units tend not to go right behind the tank. The solution: I copied an Hoz formula (thanks man!) that solves this:

Code: [Select]
[(getpos vehicle _Hoz_Leader select 0) + ((random(7))*sin(getdir vehicle _Hoz_Leader - 180)), (getpos vehicle _Hoz_Leader select 1) + ((random(7))*cos(getdir vehicle _Hoz_Leader - 180))]
Second: Combining pieces of Hoz's code, and your ideas I discovered we still have a problem regarding Inf followers.

When the group is of one unit, works perfect, the guy stays behind, follows the tank well, and in some poin I can change his behaviour, create waypoints for him etc. as you suggested.

BUT with more units, they tend to mess up in some point, and stay stopped until the end of the world, no matter if the tank waits or not.

Im starting to surrender, and think about lots of waypoints and sycronizations...

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Use tank as cover whil inf advances
« Reply #9 on: 25 Jan 2011, 04:32:24 »
Before you give up. Upload your attempt here so we can work on it together. Surely we can all find some workaround. If its part of a mission that you would rather folks not see yet, just duplicate the area where you are attempting to perform the action. It could be that terrain is interfering with AI path finding or some other unknown factor.

Offline Barbolani

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #10 on: 27 Jan 2011, 00:03:00 »
Saved, I'm completeley ashamed. I started to work on an example using various options with radio commands, and... here's the joke, I find myself messing with the first trigger, because I cannot make it work repeatedly.

In the last day I made this in 5 minutes and now I CANT!!!! WTF AM I MISSING?????

Here's the first shit I made.

The other one is a version that uses Hoz's Script...


Offline F2kSel

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #11 on: 27 Jan 2011, 02:01:06 »
See if this helps any, using your tryingtomakethis file.

in a game logic put  
Code: [Select]
check = true
Then in your repeating trigger change as follows
cond
Code: [Select]
leader grupo distance getpos commander tanque > 5 and check
That will force the triger to check the state of check and if it's true and jefe is further than 5 meters away from the tank it will update

On Act
Code: [Select]
{_x domove getpos commander tanque} forEach units grupo;check = false;This will now move the units one by one rather than have them move as a group, the result is they stay closer together behind the tank as they are no longer in formation.check = false changes the state of check so the trigger will now some thing has changed and it needs to run again

On Dea
 
Code: [Select]
check = true;This restes check back to true so the condition will be meet
 
Code: [Select]
check = true;
I also limited the tank speed for better effect otherwise it keeps stopping and starting.
Code: [Select]
tanque forcespeed 2
« Last Edit: 27 Jan 2011, 02:09:54 by F2kSel »

Offline Barbolani

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #12 on: 27 Jan 2011, 16:50:02 »
Hiya! Good point with the forcespeed command!

Regarding the rest. The problem is it seems the trigger isn't running repeatedly. Even if I just put On Condition true, the inf group leader only gives the order one time....

Offline F2kSel

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #13 on: 27 Jan 2011, 18:53:44 »
A triggers only repeats if the condition changes or elements of the condition have changed.

This is a little hard to explain but here goes.

The reason that the trigger stops is probably this.

If the distance is grater than >5 it will execute once.

It will keep checking until but not running until it's become <5 and then >5 which it sometimes does.

If the tank gets too far away the units go to the last known position of the tank but won't move again as they are now always more than 5 meters away.









 




 

Offline Barbolani

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #14 on: 27 Jan 2011, 20:35:58 »
Oh my god YES! That's it, you explained it well!

Well, tweaking a bit I discovered it only works with small groups. Big ones, like the group you have in the attached example tend to miss some soldiers by the way, and only the first 4 or 5 get close to the tank....

Maybe the solution could be put non grouped inf units and a script?

Offline F2kSel

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #15 on: 27 Jan 2011, 22:51:57 »
It may work but I think the problem is that each soldier will try and avoid each other if they get too close.

I tried this I placed 9 objects behind a tank evenly spaced out and attached them to the tank. I told each soldier to move to the object which they did. But still as soon as they get close to each other they start wonder off trying to get to their own places.



Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Use tank as cover whil inf advances
« Reply #16 on: 28 Jan 2011, 10:09:28 »
Perhaps you could then have the leader maintain distance to the tank, soldier 1 maintain distance to the leader, soldier two maintain distance to soldier 1, etc?

Offline Barbolani

  • Members
  • *
Re: Use tank as cover whil inf advances
« Reply #17 on: 28 Jan 2011, 11:48:41 »
I agree with saved, the easy solution could be split a big group in two / three, and just make the condition of the distance and the domoves in different points.

Anyway, thinking about 20 units behind a tank is not realistic. I suppose this kind of manouvres are made by 5 - 6 units as much.

So, if we use a small group, a domove foreach is ok. If the group is big, then I think a group leader domove + a compact column formation will work better. It wont make the whole group being behind the tank, but they will keep formation and won't get stucked stupidly...

Another question, In order to make the inf units continuously follow the tank, I had to make them run in safe and never fire, but it is also unrealistic. DisableAI could be the solution?

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Use tank as cover whil inf advances
« Reply #18 on: 28 Jan 2011, 13:11:47 »
I wouldn't use disableAI because you have to select what to disable and that would render them brainless. I would try setting their speedmode to limited, combatmode to Yellow which allows them to fire but not engage(leave formation), and behavior to aware which will keep them from walking with gun slung in front and they will go prone or kneel depending  on the situation. As long as the dofollow command is repeated, I think they will act as infantry but maintain distance(of course after other engine requirements have expended such as auto reaction to go prone when shots are fired or enemy is spotted.)

The problem is that the group leader always order them to return to formation. BIS needs to remedy this by creating a command that turns off a leaders ordering authority.