Jump to content
Sign in to follow this  
sputnik monroe

this Move (getpos targetwaypoint) how to randomize it a bit?

Recommended Posts

So I have four vehicles and an object named "targetwaypoint". In each vehicles init field I have...

this Move (getpos targetwaypoint)

It works, but when the vehicles reach the waypoint they end up piling up on one another. What would I add to this to have them move to a random spot within 10 meters of the targetwaypoint object? I could fudge the distance but the main thing is I don't want them all trying to get on exactly that spot which is causing the pile up.

Share this post


Link to post
Share on other sites
this move (targetwaypoint getPos [random 10, random 360])

 

  • Like 1

Share this post


Link to post
Share on other sites

I was going to post essentially the same thing as POLPOX, with the caveat that vehicles will still tend to drive into others trying to get to their specific positions. Making the random distance larger can help a little bit.

If you could assign all relevant vehicles their waypoints at the same time from the same script, you could do something where each vehicle is assigned a progressively more distant waypoint, or a specific pattern, etc.

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  

×