OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: crisbal on 19 Jan 2012, 14:02:54

Title: [SOLVED] To move a whole group using setpos command
Post by: crisbal on 19 Jan 2012, 14:02:54
What should I do to make a whole group of soldiers be moved to the position of a marker using the setpos command?
example: bravo = group this (In the init field of the team leader, named bravo_1)
"_x setpos (getmarkerpos "marker_1")" foreach units bravo (doesn't work)
"_x setpos (getmarkerpos "marker_1") foreach units group bravo_1 (the name of team leader bravo group) (doesn't work)
bravo setpos (getmarkerpos "marker_1") (doesn't work)
bravo_1 (name of team leader of bravo team) setpos (getmarkerpos "marker_1) (doesn't work if bravo_1 is killed)...
Some help please  >:(
Title: Re: To move a whole group using setpos command
Post by: qba69 on 19 Jan 2012, 14:19:14
Try this:
Quote
"_x setPos getMarkerPos ""marker_1""" forEach units bravo
Title: Re: To move a whole group using setpos command
Post by: Gruntage on 19 Jan 2012, 14:32:04
Code: [Select]
{_x setpos (getmarkerpos "markername")} foreach units groupname
This is the command I use in some of my unit spawning scripts in my missions.
Title: Re: To move a whole group using setpos command
Post by: crisbal on 24 Jan 2012, 14:27:47
Hey Thanxs ,  :clap: works perfectly!