Jump to content

DaysShadow

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About DaysShadow

  • Rank
    Rookie
  1. Many thanks, it works without but also with the line. There are braces missing: "_grp selectLeader (units _grp select 0);" If i put it that way into the script it works although i dont need to choose the leader as the NCO is the one with the highest rank in the group (didnt thought about it) :) Thanks!
  2. Hi, i'm working on a little mission with Invasion 1944 mod. I want to create a group and let them move to a waypoint. Group creation works but the waypoint doesnt seem to be applied to the group. // Create allied troops at position given by argument _position = _this select 0; _radius = _this select 1; _grp = _this select 2; "I44_Man_A_Army_DDay_NCO_M1Carbine" createUnit [ [ (_position select 0) + random _radius, (_position select 1) + random _radius ], _grp ]; "I44_Man_A_Army_DDay_M3Greasegun" createUnit [ [ (_position select 0) + random _radius, (_position select 1) + random _radius ], _grp ]; "I44_Man_A_Army_DDay_M1Garand" createUnit [ [ (_position select 0) + random _radius, (_position select 1) + random _radius ], _grp ]; "I44_Man_A_Army_DDay_M1Garand_M7" createUnit [ [ (_position select 0) + random _radius, (_position select 1) + random _radius ], _grp ]; "I44_Man_A_Army_DDay_M1Garand" createUnit [ [ (_position select 0) + random _radius, (_position select 1) + random _radius ], _grp ]; "I44_Man_A_Army_DDay_M3Greasegun" createUnit [ [ (_position select 0) + random _radius, (_position select 1) + random _radius ], _grp ]; "I44_Man_A_Army_DDay_M1Garand" createUnit [ [ (_position select 0) + random _radius, (_position select 1) + random _radius ], _grp ]; { addSwitchableUnit _x; _x allowFleeing 0 } forEach units _grp; _grp selectLeader units _grp select 0; // Everything until here works _wp = _grp addWayPoint [[904.533, 3366],0]; _wp setWaypointType "DESTROY"; _grp setCurrentWaypoint _wp; The units are created correctly, join the group correctly but they dont seem to have the waypoint i added. I used "hint str count waypoints _grp" to check if it was added but nothing is "hinted". Any help would be nice.
  3. I've tested this with a group created in editor and put this in one of the lower soldiers' init field: grp = group this; [this] join grpNull; ld = leader grp; [ld] join grpNull; this joinAs [grp, 1]; grp selectLeader this; [ld] join grp; Your soldier and the group leader are removed from the group, your soldier then joins as 1 and is selected as leader. After this just let the leader join again, he'll be at your old place.
×