Jump to content
Sign in to follow this  
Evilhardt

Equalize infantry speeds

Recommended Posts

Hi,

I need to find a way to force units without weapons to walk at the speed of units with weapons. The latter walk more slowly than the former which causes the squads cohesion to break apart. Is there a way to fix this?

The situation is that I have a patrolling team. One of the bots has all weaposn removed and a camping lantern attached to his hand. He needs to be the leader of the squad, because if he isn't his pathfining will go nuts and he will teleport all over the place because of the lantern. But him being leader causes the other guys to lose cohesion, becuause their walking speed (limited) is slower than the lantern-guy's.

I have already experimented with forceSpeed with no success.

Any other idea on how to work around this issue? :/

---------- Post added at 01:35 ---------- Previous post was at 23:47 ----------

So, a rather meh-ish workaround I came up with was to put the bots weapons into their backpacks. But now they won't take them out when attacked... is there a "takeFromBackpack" command?

Edited by Evilhardt

Share this post


Link to post
Share on other sites

Give the leader a huge backpack and load him up, load his uniform and vest also.

Could even try setting his fatigue, in a loop.

Share this post


Link to post
Share on other sites

As I said, I have already used forceSpeed. It does not slow him down the way needed. Speed of 0 he does not walk at all. Speed of 0.1 he does not walk at all either, 0.3 he walks just as quick as if there was no modifier. When I set the other guys' speed to 2, they are still as slow as if there was no modifier. When I set it to 3 they will run a few meters then hold and wait. Then run a few meters again and hold and wait... the cohesion is kept up this way but it looks retarded. I want them to move in a chilled manner.

@Squeeze: I guess I'll have to try this in lack of more elegant solutions :D

Share this post


Link to post
Share on other sites

The problem seems to be the animations speeds are different, applying forcespeed only has a limited effect before it changes the animation and that new animation my be too quick or too slow.

Basically forcespeed only has a limited effect per animation which makes it extremely difficult to match speed.

The closest I got was

armed bots

"safe","limited", forcespeed 2.21

leader

"safe","limited",forcespeed 2.8

Leader still moves too slow and bots are too fast but if you increase leaders speed he then runs away and if you slow bots the walk really slowly

What you could do with bots would be to create an array of weapons and then remove them and then add them back when needed, at waypoint or when they become aware.

Either that or use a distance check on the leader to stop him until next unit is within range.

Share this post


Link to post
Share on other sites

Thanks. I have tried your speed levels and I think they are good enough. I tried adjusting them to get an even better fit, but those are indded the closest you get it seems.

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  

×