Announcement

Collapse
No announcement yet.

CSAR CSAT Mission

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSAR CSAT Mission

    So after a couple playthroughs I want have a list of changes I'm going to implement on this mission:

    - Increase player count to 16 on the ground team to accommodate more players. This will require either two helicopters, or two trips. Both sound like they could be fun options.
    - Set enemies to respawn in some fashion so the ground team can't just shoot their way out of the fight.
    - Add in randomized enemy units for variety.


    I am running into a problem getting the respawn portion to work. I've found a number of guide that make respawning AI easy enough, but I need to have them respawn based on the randomized location of the ground team. Anyone here tried anything like that before?

  • #2
    Re: CSAR CSAT Mission

    Code:
    if (isServer) then { setDate [2035, 6, 6, (paramsArray select 0), 1]; };
    
    "ldrpos1" setMarkerPos getPos mr1;
    
    "Beacon" SetMarkerPos [(getMarkerPos "ldrpos1" select 0)-200*sin(random 359),(getMarkerPos "ldrpos1" select 1)-200*cos(random 359),+0];
    
    "Beacon" setMarkerSize [paramsArray select 1,paramsArray select 1];
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(0),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(0),+0]} forEach units group grp1;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(45),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(45),+0]} forEach units group grp2;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(90),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(90),+0]} forEach units group grp3;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(135),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(135),+0]} forEach units group grp4;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(180),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(180),+0]} forEach units group grp5;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(225),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(225),+0]} forEach units group grp6;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(270),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(270),+0]} forEach units group grp7;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(315),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(315),+0]} forEach units group grp8;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(15),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(15),+0]} forEach units group grp9;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(100),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(100),+0]} forEach units group grp10;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(250),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(250),+0]} forEach units group grp11;
    
    {_x SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(295),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(295),+0]} forEach units group grp12;
    
    heli2 SetPos [(getMarkerPos "ldrpos1" select 0)-50*sin(random 359),(getMarkerPos "ldrpos1" select 1)-50*cos(random 359),+0];
    
    wp = GroupSquad1 addwaypoint [getMarkerPos "ldrpos1",0];
    wp setWaypointType "SAD";
    wp setWaypointSpeed "FULL";
    
    wp1 = GroupSquad2 addwaypoint [getMarkerPos "ldrpos1",0];
    wp1 setWaypointType "SAD";
    wp1 setWaypointSpeed "FULL";
    
    wp2 = GroupSquad3 addwaypoint [getMarkerPos "ldrpos1",0];
    wp2 setWaypointType "SAD";
    wp2 setWaypointSpeed "FULL";
    
    wp3 = GroupSquad4 addwaypoint [getMarkerPos "ldrpos1",0];
    wp3 setWaypointType "SAD";
    wp3 setWaypointSpeed "FULL";
    
    wp4 = GroupSquad5 addwaypoint [getMarkerPos "ldrpos1",0];
    wp4 setWaypointType "SAD";
    wp4 setWaypointSpeed "FULL";
    
    wp5 = GroupSquad6 addwaypoint [getMarkerPos "ldrpos1",0];
    wp5 setWaypointType "SAD";
    wp5 setWaypointSpeed "FULL";
    
    wp6 = GroupSquad7 addwaypoint [getMarkerPos "ldrpos1",0];
    wp6 setWaypointType "SAD";
    wp6 setWaypointSpeed "FULL";
    
    wp7 = GroupSquad8 addwaypoint [getMarkerPos "ldrpos1",0];
    wp7 setWaypointType "SAD";
    wp7 setWaypointSpeed "FULL";
    
    wp8 = GroupSquad9 addwaypoint [getMarkerPos "ldrpos1",0];
    wp8 setWaypointType "SAD";
    wp8 setWaypointSpeed "FULL";
    
    wp9 = GroupSquad10 addwaypoint [getMarkerPos "ldrpos1",0];
    wp9 setWaypointType "SAD";
    wp9 setWaypointSpeed "FULL";
    
    wp10 = GroupSquad11 addwaypoint [getMarkerPos "ldrpos1",0];
    wp10 setWaypointType "SAD";
    wp10 setWaypointSpeed "FULL";
    
    wp11 = GroupSquad12 addwaypoint [getMarkerPos "ldrpos1",0];
    wp11 setWaypointType "SAD";
    wp11 setWaypointSpeed "FULL";

    Comment


    • #3
      Re: CSAR CSAT Mission

      As worked on for a couple mins :D...
      guardMonitor.sqf called from init.sqf and only on server....
      Code:
      //guardMonitor.sqf - to monitor enemy groups and execute an instance of a script to spawn and clean up enemy AI - executed on server only
      private "_run";
      /*in init.sqf create the following lines
      if (isServer) then 
      {
           _handle = []execVM “Noya\guardMonitor.sqf”;
      };
      */
      sleep 5;
      _run = true;
      group1Active = "false";
      publicVariable "group1Active";
      group2Active = "false";
      publicVariable "group2Active";
      group3Active = "false";
      publicVariable "group3Active";
      
      while {_run} do
      {
      	if (group1Active == "false") then
      	{
      		[0]execVM "Noya\spawnGroup.sqf";
      	};
      	sleep 10;
      	if (group2Active == "false") then
      	{
      		[1]execVM "Noya\spawnGroup.sqf";
      	};
      	sleep 10;
      	if (group3Active == "false") then
      	{
      		[2]execVM "Noya\spawnGroup.sqf";
      	};
      
      
      	sleep 10; //check this loop every 5 seconds
      };
      spawnGroup.sqf
      Code:
      //spawnGroup.sqf - to spawn a group, set waypoints and behavior, monitor for deactivation and delete units when area clear of players
      //going to ignore HC options and spawn on server
      
      _groups = ["group1","group2","group3"];
      _target = _this select 0;
      if (_target == 0) then 
      {
      	group1Active = "true";
      	publicVariable "group1Active";
      	_targetEIgroup = _groups select _target;
      };
      if (_target == 1) then 
      {
      	group2Active = "true";
      	publicVariable "group2Active";
      	_targetEIgroup = _groups select _target;
      };
      if (_target == 2) then 
      {
      	group3Active = "true";
      	publicVariable "group3Active";
      	_targetEIgroup = _groups select _target;
      };
      
      player groupChat format ["spawnGroup.sqf is running for %1...", _target + 1];
      
      private "_run";
      _run = true;
      
      
      private "_possibleUnits";
      _possibleUnits = ["B_soldier_AR_F","B_Soldier_GL_F","B_Soldier_lite_F","B_Soldier_F","B_Soldier_A_F","B_medic_F"];
      
      private "_groupDirection";
      _groupDirection = floor random 360;
      
      _targetEIgroup = createGroup west;
      _unitOne = _targetEIgroup createUnit ["B_Soldier_TL_F", position eiSpawn, [], 0, "FORM"];
      sleep 2;
      _unitOne SetPos [(getMarkerPos "ldrpos1" select 0)-(paramsArray select 2)*sin(_groupDirection),(getMarkerPos "ldrpos1" select 1)-(paramsArray select 2)*cos(_groupDirection),+0];
      
      sleep 2;
      
      for "_i" from 1 to 3 do
      {
      	_unit = _targetEIgroup createUnit [(_possibleUnits select (floor random (count _possibleUnits))), (position (_unitOne)) , [], 0, "FORM"];
      };
      sleep 2;
      {
      _x unassignItem "itemMap";
      _x removeItem "itemMap";
      _x unassignItem "itemGps";
      _x removeItem "itemGps";
      }forEach units _targetEIgroup;
      
      wp = format ["wp%1", _target];
      wp =_targetEIgroup addwaypoint [getMarkerPos "ldrpos1",0];
      wp setWaypointType "SAD";
      wp setWaypointSpeed "FULL";
      	
      //******begin loop to check if group is dead and reset to respawn
      
      
      while {_run} do
      {
      	_groupAlive = false;
      	{
      		if (alive _x) then {_groupAlive = true;};
      	}forEach units _targetEIgroup;
      	
      	if (!_groupAlive) exitWith
      	{
      		_run = false;
      		if (_groups select _target == "group1") then 
      		{
      			sleep ((random 50) + 30);
      			group1Active = "false";
      			publicVariable "group1Active";
      		};
      		if (_groups select _target == "group2") then 
      		{
      			sleep ((random 50) + 30);
      			group2Active = "false";
      			publicVariable "group2Active";
      		};
      		if (_groups select _target == "group3") then 
      		{
      			sleep ((random 50) + 30);
      			group3Active = "false";
      			publicVariable "group3Active";
      		};
      	};
      
      
      };
      |TG-189th| Unkl
      ArmA 3 Game Officer
      Dean of Tactical Gamer University
      189th Infantry Brigade Member
      SUBMIT A RIBBON NOMINATION OR CONTACT AN ARMA ADMIN
      "We quickly advance in the opposite direction and take cover in a house on the SW side of town." - BadStache

      Comment


      • #4
        Re: CSAR CSAT Mission

        V2 is now on the server.

        - Redid the enemy scripts so they will search a larger distance over time
        - once they get too far out they come back and start over
        - if they are stagnant too long they get told to start again
        - added a beacon sound that will play in the search helicopters based on the distance they are from the crash site (you may wish to remove the map marker in a separate option?)
        - the beacon sound is played based on the distance set in the mission parameters or at 1km if you choose no map beacon.
        - added TFR radio to the downed helo (via TG Arsenal) so a leader can grab a radio if needed to communicate with a chopper pilot via Long Range
        |TG-189th| Unkl
        ArmA 3 Game Officer
        Dean of Tactical Gamer University
        189th Infantry Brigade Member
        SUBMIT A RIBBON NOMINATION OR CONTACT AN ARMA ADMIN
        "We quickly advance in the opposite direction and take cover in a house on the SW side of town." - BadStache

        Comment


        • #5
          Re: CSAR CSAT Mission

          Can't wait to give this new version a try.

          Comment

          Connect

          Collapse

          TeamSpeak 3 Server

          Collapse

          Advertisement

          Collapse

          Twitter Feed

          Collapse

          Working...
          X