Jump to content

Recommended Posts

 

I'm trying to make a small script for my UGVs, using respawn modules, in need random movement to get som enemy UGV's, 

 

I use this now, and it works for on MarkerPos

_veh = _this #0; _veh move (getMarkerPos "25");

 

How do I combined this?

 

_randomElement = selectRandom [1,2,3,4,5];

https://community.bistudio.com/wiki/selectRandom

Share this post


Link to post
Share on other sites

_veh = _this #0; _veh move getMarkerPos selectRandom ["25","26","27"];

 

You should give some alphanumeric names, like mk25 or mk_25 to your markers. Just a better practice and readability than full numeric names.

  • Like 1

Share this post


Link to post
Share on other sites

Thank you very much, it works as always 🤩 

 

 

I had kind of figured that I could get into trouble with just a number, but I'm way too deep into the project now.

Share this post


Link to post
Share on other sites

Place a waypoint on the map.  A man will move to the centre of the waypoint.

 

Now set the radius of the waypoint to 500 meters. The man will move to a point at random within the circle. In effect this is a random waypoint.

 

The centre of the waypoint could be a building or a pond or some other obstacle. Set the completion radius to 30 meters to avoid obstacles.

.

 

 

 

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

×