Jump to content
Sign in to follow this  
VictorFarbau

Any way to force trucks to take only roads?

Recommended Posts

As the title says... I wonder if anybody found a neat trick to have trucks only take regular roads. In my current mission framework I got supply trucks crossing the whole (Sara) island.

It seems that the path finding algorithm is willing to trade speed for trip length; resulting in trucks leaving roads and crossing the wilderness now and then.

Which is a problem in my mission - once trucks start taking shortcuts through the bushes they often get stuck completely (at trees, bushes or steep slopes) or the mission is long finished before they're even close to their target.

Cheers,

VictorFarbau

Share this post


Link to post
Share on other sites

I don't know the answer to your question 100%, but I might be able to point you in the right direction. The trucks (and all units, I believe) prefer to take roads except when their combat mode is "RED" (might be "YELLOW" or higher, it'd be easy to test). So it's possible that your trucks think they're under attack, or that they're being initialized in a combat mode higher than "GREEN". Try setting their combat mode to "GREEN" and see if that fixes it. Hope it works for you, and if it doesn't, I hope that it at least gets you in the right direction. smile_o.gif

Share this post


Link to post
Share on other sites

Hi Namikaze,

actually, I thought along the same lines smile_o.gif So I should have mentioned that I set the combatModes to green and the waypointbehaviour to careless already. But it didn't work out so far.

I have a hunch that the only way to do it would be to edit the vehicle config and flip the magical "offrad capable" bit - if there is one, I don't know yet. But I wanted to avoid changing addons if possible.

Thanks,

VictorFarbau

Share this post


Link to post
Share on other sites
Hi Namikaze,

actually, I thought along the same lines  smile_o.gif So I should have mentioned that I set the combatModes to green and the waypointbehaviour to careless already. But it didn't work out so far.

I have a hunch that the only way to do it would be to edit the vehicle config and flip the magical "offrad capable" bit - if there is one, I don't know yet. But I wanted to avoid changing addons if possible.

Thanks,

VictorFarbau

Can you just do the waypoints in segments? Give them one waypoint to an intersection half a km away and then to another and then another or will that not work? Thats what I do when I want to make sure they take the way I want them to.

Share this post


Link to post
Share on other sites

Set their combat "stance" to SAFE and they'll use the roads more, unless told to go through terrain.

Share this post


Link to post
Share on other sites

Wow, "SAFE" is indeed helping a lot. Now, how did you know that and why of all 5 modes "SAFE"?

Thanks,

VictorFarbau

Share this post


Link to post
Share on other sites

You can let a Car / Convoy what ever drive from north to south with only 2 WP.

All you have to do is to set the FIRST WP to "SAFE" and they will always use the street.

It's enough to config the first WP only! and all other WP will use the settings from the FIRST WP till you do not change any settings after the FIRST WP.

1. WP, where the vehicle should drive to with Behaviour "SAFE"

2. WP to where the vehicle started. Maybee set it to Repeat to let the Vehicle drive from north to south all the time using the streets only.

Share this post


Link to post
Share on other sites
Wow, "SAFE" is indeed helping a lot. Now, how did you know that and why of all 5 modes "SAFE"?

Thanks,

VictorFarbau

I was always under the impression that careless was the same as safe only they wouldn't switch out of it if they came under attack maybe I was wrong. Even the Biki says this:

Quote[/b] ]Careless - Careless behaviour will cause the group move and behave in a very non-combat manner. The group will form into a Compact Column like formation, where each unit will directly follow the man in front rather than moving in a formation. Soldiers will carry their weapons in safe position (rifles across body, pistols holstered) and walk slowly. Infantry will not fire on enemy targets (unless they have wounded legs), but vehicles will still fire on enemies. Groups in careless mode do not switch to a more alert mode if enemies are encountered. All unit types show preference moving along roads whenever possible.

Safe - Similar to Careless, except the group will change behaviour to Aware upon detecting an enemy unit.

I wonder why careless didn't work then.

Share this post


Link to post
Share on other sites

Yes, "careless" didn't work for me for some reason. And even better, I had applied SNKMAN's suggestion before (setting Waypointbehaviour) and that also didn't work even though this was the obvious coding choice.

So what I am doing now is to issue a <setBehaviour "safe"> command on each vehicle instead.

I agree it should have worked using "careless" and using waypoint behaviours but it just didn't.

EDIT: BTW, I cannot find the quoted Biki entries anywhere under "Behaviour" or "SetBehaviour". At least I am not totally blind now smile_o.gif

Cheers,

VictorFarbau

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×