Jump to content
Sign in to follow this  
-radkeff-

Setpos a whole group ?

Recommended Posts

Im doing a map where i want patrols to start at random locations. Actually its more than four positions but i keep it simple...heres the code

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_group = _this select 0

_ran = random 4

?_ran < 1 : goto "a"

?_ran < 2 : goto "b"

?_ran < 3 : goto "c"

goto "d"

#a

_g setpos (getmarkerpos "p")

exit

#b

_g setpos (getmarkerpos "p_1")

exit

#c

_g setpos (getmarkerpos "p_2")

exit

#d

_g setpos (getmarkerpos "p_3")

exit

<span id='postcolor'>

Now...I want to move the whole group to one location..so is there a command to execute this for the whole group with one array like; [group hora] exec "random.sqs" ? or are there any other close solutions ?

thx

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_group = _this select 0

_ran = random 4

?_ran < 1 : goto "a"

?_ran < 2 : goto "b"

?_ran < 3 : goto "c"

goto "d"

#a

"_x setpos (getmarkerpos {p})" foreach units _group

exit

#b

"_x setpos (getmarkerpos {p_1})" foreach units _group

exit

#c

"_x setpos (getmarkerpos {p_2})" foreach units _group

exit

#d

"_x setpos (getmarkerpos {p_3})" foreach units _group

exit

<span id='postcolor'>

That will setpos a whole group.

RED

Share this post


Link to post
Share on other sites

Or you can group sqad leader with each of these markers and sqad members set to start in formation.

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  

×