Jump to content

Vehicles crashing into each other


Recommended Posts

Ala13_Kokakolo
Posted

Even in the old 1946 vehicles had the decency of avoiding crashed or damaged vehicles they found on the road... not here. The run like headless chicken into  whatever obstacle is on the road... any solution?

Jade_Monkey
Posted

I asked Han. He said that avoiding collision was really complex and is not implemented in depth.

Ala13_Kokakolo
Posted

That is not an answer. Will they fix it at some point? Even the old 1946 had a system...

Ala13_Kokakolo
Posted

I have linked a proximity trigger linked to a panic formation set to 25 meters from any vehicle and it is working relatively OK with groups. The only thing is you must create one per vehicle, but once done groups up to 8 vehicles or more avoid relatively well crashing into each other. 

Ala13_Kokakolo
Posted

I cannot reproduce the mistake. I took the culprit group and relocated it in Lapino. Now when I kill the first unit the second one is the one deleted (but the game does not crash). So if I got 4 units and I shot the first one, this first one gets destroyed and the unit 2 is deleted (so only 2 left). Another surprise is I made the test in lapino map and in this map trucks avoid collision by themselves if there is an obstacle on the road, but they do not avoid it neither in moscow or stalingrad... I have to continue testing this issue because I have only tested it once.

Posted (edited)

My trucks avoid destroyed vehicles from the same column on all maps, but not always. Sometimes they don't do it and try to force their way through wreckage. Undamaged tanks eventually succeed, but lighter vehicles get damaged.

 

 

 

Now when I kill the first unit the second one is the one deleted (but the game does not crash).

 

I think what happens is that leadership is transfered to the next vehicle, and then it gets destroyed because it's now the leader.

Edited by coconut
Ala13_Kokakolo
Posted

Ok I managed of reproducing the error. It is due to the fact EVERY unit has a panic trigger (otherwise only the first one will avoid other cars on the road)

 

I have attached the file with the mission. 


If you remove [onkilledEvent]<----------------> delete from the lider, you will be able to see what did I achieve so far. Shot the leader or any other vehicle on the middle of the column and see what happens. It is not perfect but is better from what we had.

Delete test.zip

MF-Belgarufo
Posted (edited)

Like Coconut this has never been a problem for me, and in the rare case that Coconut has described that the following vehicle try to force it's way through the wreckage, was it perhaps due to not having enough room to maneuver around the destroyed vehicle?

 

Try setting them up directing them to their waypoints but do not use a formation command to get them moving. Using just the way points, they seem to default to on road if the way points are on roads.  I am not sure if this is why mine work the way they do or not, but when I kill the lead vehicle the others go around the dead one and continue on...  in fact they barely even seem to hesitate which gets a little crazy when I engage in a tank, thinking I've got the first one sighted in an can just blast the rest without adjustments.  It's almost as if they make their deviated path around the destroyed vehicle with much haste.

 

Haven't really done too much testing here as I can't recall any instance where they collide with the lead vehicle.  I have engaged all of my convoys (with and without panic stop loops) with AC and tanks.  I get the same result.  I do not spawn my convoys either, I activate the lead vehicle with the others target linked to it, then direct just the lead vehicle to follow waypoints.  Of course using panic stops, or just a regular stop is a formation MCU but to get them to move I just trigger the appropriate waypoint and set the speed there. Of course if you want them to travel overland, line abreast they must be handled differently but then they really shouldn't be able to run into each other anyway.  Perhaps the issue may be a certain mixture of vehicle types?  I have had huge gaps appear in convoys that had slower tanks behind faster half tracks or trucks. This is due to the waypoint speed and was easy to adjust, but in these cases if there are faster vehicles behind the slower tanks, they do not attempt to overtake or run into the tanks, while the vehicles in front of the tanks, that can match the waypoint speed, just leave the rest in the dust....

 

I hope this helps.... 

 

The ME is powerful, and complex. As are the AI routines. There's bound to be a ton of grey area. My rule of thumb is to keep the logic regarding AI anything as simple as possible as far as trying to force the AI's behavior.  While it is possible to order individuals in target linked "team" columns to do things separate from the group, it tends to be messy.  Treat the group as one entity as much as you can.  Also if you need to "respawn" the group, simply use a copy of the original and activate it based on whatever. Heck use 10 copies.  If they are not all active at once, you don't take a CPU hit. 

 

There are no easy answers with any of the AI but keep up the fight!  We are all still pioneering in many respects, especially in the MP category. Crazy thing is there are mission makers out there that are just killing it, and have a darned good grasp on a lot of this stuff that don't post in these threads too often, prolly cause mission making takes a lot of time (even with a ton of .pre-built groups on hand ). It doesn't help that this Mission editing section of the forum is highly disjointed.  I see the same questions popping up every couple months or so, and a lot of good info is getting buried in the heap.  

 

Don't get frustrated. Stay the course. It's worth it, or at least I think it is.

Keep posting, and keep reading! I can't even express how much ALL of you other Mission makers have helped me.

 

 

Thanks and <S>

Edited by MF-Belgarufo
LLv34_Temuri
Posted

I activate the lead vehicle with the others target linked to it, then direct just the lead vehicle to follow waypoints.

Too bad this doesn't seem to work when the vehicles are spawned :(

MF-Belgarufo
Posted (edited)

no, it really doesn't work, if spawning vehicles it is very difficult to get them to act as a "team".  They just don't seem to use the same level of collision detection this way.

 

but I've found no need to spawn vehicles in groups...   

 

If i want a convoy to "re-spawn" at certain intervals I simply use a copy.  I've even placed the copy right on top of the "original" and then just use the activate command. As long as only one group is active there is not issue.

 

Just a little paradigm shift.  Spawner ONLY for individuals....

 

Activate must be used for groups.  But then treat that groups as a whole.

 

a bit of a duality complex, but having the two options is nice as it covers all the bases.  Hopefully in the future groups can be spawned to work together, but it seems incredibly programming-wise. 

 

There seems to be a time and place for each instance depending on what you are trying to accomplish, after that its just a matter of testing and testing and testing....  

 

Until I hear or experience otherwise, these are the constraint I work under and I really don't feel like they limit me.  Of course I am not trying to build a mission generator either though.... :)

in this case the ability to spawn and control groups as a "team" is almost required.

God Bless those guys! I'd love to see a MP dynamic mission generator, but at this point it seems a ways off.


this should probably be in a new thread, but has any one tried the cover command using GV's covering GV's?

 

This may be intriguing....

Edited by MF-Belgarufo
LLv34_Temuri
Posted

If i want a convoy to "re-spawn" at certain intervals I simply use a copy.  I've even placed the copy right on top of the "original" and then just use the activate command. As long as only one group is active there is not issue.

Do you mean that if, for example, you have a convoy that should be respawned every 30 minutes, and the mission lasts for 4 hours, you would just place enough copies of the convoys so that they won't "run out"? Or does activating work so that when the convoy reaches its destination (and is deleted/deactivated) or is destroyed, a new one can be activated and it will appear in the starting position?

Posted

Activating does not spawn new vehicles. You would need 8 copies.

LLv34_Temuri
Posted

Activating does not spawn new vehicles. You would need 8 copies.

Ok. Then it's not an option for us. We have a mission running 14 hours so we would need quite a lot of copies and logic so that a server input command would activate one group at a time.

Ala13_Kokakolo
Posted

You can select "do not delete after killed" deactivate them after being killed, move them to the original destination, activate again and use the destroy CMD repare them entirely. I have not tested it with moving units, but I have used this system with non moving entities and it did work.

Menacing_Ferrets
Posted

yep eight copies would work fine.  As long as they are not all active at once you don't suffer the drain of eight copies because 7 aren't requiring cpu resources to run their AI routines (i.e. acquiring and shooting at attackers, or avoiding obstacles).  Now if you just plaster a mission with many many many of these multiple copy sets I'd imagine it would eventually be too much. Then you just use a chain of timers to activate the eight copies in sequence at your given interval (say launch one convoy every half hour).  Of course you'll want to deactivate the prior column prior to activating it's replacement. 

 

As far as not deleting them and healing them, that works fine, however you cannot just move the group back to the original position without them having to travel there. When you heal them they start out where they died.

 

This method as Kokakolo mentioned is great for stationary vehicles/arty.

  • 1 year later...
IRRE_FlyPlatypus
Posted (edited)

I found a solution to avoid crash with a spawning convoy that's working for me:

Put an Ondamaged event on every vehicles that activate a command: formation "panic stop". Link it to every vehicles of the convoy.-----> If one vehicle of the convoy is damaged or killed, all the convoy should stop.

Put an Onkilled event that delete the vehicules killed with a delete trigger. (you can delete him after X time) -------------------------------------> After the vehicle explode, he will desapear after X time and free the road for the other vehicles!

When the vehicles is deleted, you can trigger a Command: formation "continue moving" on all your vehicles (after X time for exemple)--> The road is free, the vehicles comes back to the road and ends up there travel.

 

Et voilà! Your vehicles shouldn't crash!

Edited by -IRRE-FlyPlatypus
  • Upvote 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...