Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Groups not moving after teamswitching possible solution  (Read 3021 times)

0 Members and 1 Guest are viewing this topic.

Offline Trexian

  • Members
  • *
Ok, I *think* I've sorted the ArmA1 issue with teamswitch and moving groups.  To recap: if you were the leader of a group and teamswitched out, the group would simply stop and freeze.

The real solution was here, by Wolfrug:
http://www.ofpec.com/forum/index.php?topic=30086.0

But there was no effective (or at least easy) way of catching when the player teamswitched, until A2, with onTeamSwitch.
http://community.bistudio.com/wiki/onTeamSwitch

Anyway, I put this into the init of a SIMPLE simple mission.
Code: [Select]
onTeamSwitch "selectPlayer (leader _from); {_x doFollow leader _from} foreach units _from; selectPlayer _to;";

It looks like it works, at least with pre-set (in editor) waypoints.  Haven't played with it in terms of scripted waypoints or sending orders then teamswitching out.

(Also, I don't think the semicolon inside the quotes is necessary.)

This may not be the "real" solution, but it is a step, methinks. :)

Sic semper tyrannosauro.