Jump to content
jam0

Setting random start for whole group

Recommended Posts

Hello Community.

I'm sitting on a mission for 4 days now, and I'm now planing to involve 2-4 hostages which are in the same group. 
I've made some markers to set random start points. That works... kind of. The problem is that the group members are choosing their own marker to spawn at, but i want the whole group to spawn together at one of the markers.
I tried to set the spawn-radius, but thats not working out for me.

Thanks to everybody already  =)
- jam0

Share this post


Link to post
Share on other sites

Use some code to do that.  Something along the lines of:

 

_markerArray = selectRandom[ [marker1_1, marker1_2], [marker2_1, marker2_2], [marker3_1, marker3_2] ];

{

_x setPos (getMarkerPos (_markerArray select _forEachIndex));

}forEach units (group this);

 

Place this in the init field of 1 unit.  (untested and written on my phone, no guarantees)

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

×