Jump to content
Sign in to follow this  
BlackbirdSD

Simple way to have vehicles randomly patrol roads?

Recommended Posts

Is there a scripted waypoint for vehicles so they patrol large areas of roads without going offroad?  I tried [group this, getPos this, 1000] call BIS_fnc_taskPatrol; and leave them on safe but quite often they leave the roads.

 

Thanks

Share this post


Link to post
Share on other sites

Ah bub, there's lots of ways to solve your problem. 

If all you want is them to stick to roads, then you can use https://community.bistudio.com/wiki/setWaypointBehaviour to "SAFE". AI will stick to roads, unless they spot an enemy. This can be set in the editor without using any scripts, by changing either group properties or waypoint properties. See https://community.bistudio.com/wiki/AI_Behaviour for background. 

If you want a script to automate the spawning of these groups and the assignment of waypoints, then you could modify one of several existing scripts. Engima's Traffic Script:

-Springs to mind. But there's should also be other examples that won't even need modifying. 

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  

×