Home   Help Search Login Register  

Author Topic: [SOLVED] To move a whole group using setpos command  (Read 2955 times)

0 Members and 1 Guest are viewing this topic.

Offline crisbal

  • Members
  • *
[SOLVED] To move a whole group using setpos command
« 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  >:(
« Last Edit: 24 Jan 2012, 14:28:23 by crisbal »

Offline qba69

  • Members
  • *
Re: To move a whole group using setpos command
« Reply #1 on: 19 Jan 2012, 14:19:14 »
Try this:
Quote
"_x setPos getMarkerPos ""marker_1""" forEach units bravo

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: To move a whole group using setpos command
« Reply #2 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.
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline crisbal

  • Members
  • *
Re: To move a whole group using setpos command
« Reply #3 on: 24 Jan 2012, 14:27:47 »
Hey Thanxs ,  :clap: works perfectly!