Jump to content
Sign in to follow this  
maur

Moving markers (or units) before they spawn on mission start

Recommended Posts

I have a mission that can be played on multiple locations depending on the value selected in a parameter.

The code i have now moves the spawn markers to the position of the markers corresponding to each possible location (determined by the parameter).

My problem is that the groups spawn before the markers are moved. The units never change location even if the markers do.

Is there a way to run the marker moving code before the mission spawns the units?

I have tried simply moving the groups but since i havent found a way of moving entire groups, just units, they all appear clumped up (with the code below).

{_x setpos _raFact} forEach units GrpBLU;

Advice on any of these problems would be greatly appreciated.

Share this post


Link to post
Share on other sites

i'd suggest using commands like

{ _centre = [ _rafact, 10 + ceil ( random 60) , random 360] call BIS_fnc_relPos;
_spawnposition =  _centre findEmptyPosition [1,100];
_x setpos _centre; } foreach units GrpBLU;

first bit finds a position relative to another location.

the second bit makes sure the position is empty

the third bit is the setpos.

hope that might help.

Share this post


Link to post
Share on other sites

That's what i was trying to do, thank you very much.

If anyone can solve the other question it would be good to know too.

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  

×