Jump to content

CaptainBravo

Member
  • Content Count

    731
  • Joined

  • Last visited

  • Medals

Posts posted by CaptainBravo


  1. I thought that might be the case so I moved spawn poit right above player head and only saw 2 :confused:

    Edit: never mind, the triggor had only HR1 and HR2 in init field.

    Just out of curiousty what is the line below the determines how many waves of reinforcments?

    //////////////////////////////////////////////////////////////////

    // Function file for Armed Assault

    // Created by: 1ID-CPL. Venori

    //////////////////////////////////////////////////////////////////

    // Preplace 2 markers.

    // "HR_SPAWN" where you want the helos to start from and "reload" at.

    // "HR_LZ" where you want the helos to land.

    // (Optional) "HR_PP" where you want the ground troops to attack/patrol.

    /*

    Required Arguments:

    ["missionname",["HR_SPAWN","HR_LZ","HR_PP"],2,["HR1","HR2","HR3"],8,false,"MH60S",west]

    missionname (Datatype = string)

    This is the name of the mission. It will be used as a public variable to keep track of how many reinforecment waves are left.

    ["Spawn Marker Name","LZ Marker Name","Optional Patrol Point Name"] (Datatype = array of strings)

    The first element is the name of the spawn point marker. The second element is the name of the LZ point marker. The third element is optional and is the name of the patrol/attack point marker.

    2 (Datatype = number)

    This argument is the number of waves to call, how many times the helicopters will bring in troops.

    ["HR1","HR2","HR3"] (Datatype = array of strings)

    The next argument is an array of strings, each will become the name of a vehicle used by the script. No limit, but anything more than 2-3 can result in midair collisons. :)

    Optional Arguments:

    8 (Datatype = number) (Optional)

    Default is 0. This element controls the type of groups spawned. If set to 0 two random pre-built fireteams will be spawned (6-8 men per helo) if set to a number greater than 0 that many soldiers will be spawned as one group.

    false (datatype = boolean) (Optional)

    Default is true. If set to false the spawned infantry groups will patrol the LZ or optionally declared Patrol Point. If set to true they'll Search and Destroy at the location.

    "MH60S" (Datatype = string) (Optional)

    Default is "MH60S". This element is the class name of the vehicle spawned for this script.

    west (Datatype = side) (Optional) (Untested)

    Default is west. This element determines the side of the vehicle being spawned, and therefore the units as well.

    Examples:

    Default:

    nul = ["firstwave",["HR_SPAWN","HR_LZ"],7,["HR1","HR2","HR3"]] execVM "HR.sqf";

    -- mission called "firstwave", 5 waves of 2 fireteams patrolling the LZ from 2 helos.

    Full options:

    nul = ["firstwave",["HR_SPAWN","HR_LZ","HR_PP"],7,["HR1","HR2","HR3"],10,false,"MV22"] execVM "HR.sqf";

    -- mission called "firstwave", 2 waves of 10 units in each of 3 Ospreys which will Search and Destroy at marker HR_PP.

    */

    // Required arguments

    _missionName = _this select 0; // string, name for mission

    _waypoints = _this select 1; // array, list of spawn, lz and attack waypoints.

    _waypointSpawn = _waypoints select 0; // string, marker name, spawn point and reload point for helos

    _waypointLZ = _waypoints select 1; // string, marker name, insertion point for helos

    _waypointPatrol = if (count _waypoints > 2) then {_waypoints select 2} else {_waypointLZ}; // string, optional marker name, attack point for ground units, defaults to LZ

    _waveCount = _this select 2; // number, how many waves to drop off.

    _vehicles = _this select 3; // array, strings, object names for the helos.

    _numVehicles = count (_this select 3); // number, simple count of how many names were entered.

    // Optional arguments

    _groupCount = if (count _this > 4) then {_this select 4} else {0}; // number, how many units per chopper, overrides fireteam assignment.

    _groupSpawnMethod = if (count _this > 5) then {_this select 5} else {true}; // boolean, true = attack point, false = patrol point

    _typeVehicles = if (count _this > 6) then {_this select 6} else {"MH60S"}; // string, vehicle class, default "MH60S"

    _vehicleSide = if (count _this > 7) then {_this select 7} else {west}; // side, side of the groups created, default west.

    // Only spawn once, on the server.

    if(!isServer) exitWith{};

    // Create the group.

    _grp = creategroup _vehicleSide;

    _fleet = [];

    // For each vehicle name given, create a vehicle and assign it it's wave count.

    for "_x" from 1 to _numVehicles do

    {

    _veh = ([getMarkerPos _waypointSpawn, 45, _typeVehicles, _grp] call BIS_fnc_spawnVehicle) select 0;

    _unitName = _vehicles select (_x - 1);

    _veh setVehicleVarName _unitName;

    call compile format ["%1 = _veh; publicVariable '%1';", _unitName];

    //_veh setVariable[_missionName, 5, true];

    sleep 5;

    _fleet set [(_x - 1),_veh];

    };

    // Make the group fly groupy.

    _grp setFormation "LINE";

    _grp setBehaviour "CARELESS";

    // Set the wave count

    call compile format ["%1 = %2; publicVariable '%1';", _missionName, _waveCount,_waypointLZ];

    // Spawn the first wave.

    [_missionName,_waypointPatrol,_fleet,_groupSpawnMethod,_groupCount] execVM "HR_spawnGroup.sqf";

    // Set the waypoints for the helo group. Their origin point is waypoint 0.

    _wp = _grp addWaypoint [getMarkerpos _waypointLZ, 1]; // waypoint at the LZ marker.

    _wp1 = _grp addWaypoint [getMarkerPos _waypointSpawn, 1]; // waypoint back at the spawn marker.

    _wp2 = _grp addWaypoint [getMarkerPos _waypointSpawn, 1]; // Cycle waypoint at spawn marker too.

    [_grp, 1] setWaypointType "TR UNLOAD"; // Set the 1 (second actual waypoint, hence 1 instead of 0) to TRANSPORT UNLOAD.

    [_grp, 2] setWaypointType "MOVE"; // set the 2 waypoint to MOVE with the following call to spawn another group:

    _waypointStatements = format["nul = [""%1"", ""%2"", %3, %4, %5, %6] execVM ""HR_spawnGroup.sqf""",_missionName,_waypointPatrol,_fleet,_groupSpawnMethod,_groupCount,_waypointLZ];

    [_grp, 2] setWaypointStatements ["true", _waypointStatements];

    [_grp, 3] setWaypointType "CYCLE"; // set the 3 waypoint to CYCLE

    // For some reason the first helo ends up heading to the HR_PP instead of the LZ... I have no idea why. :(


  2. Thanks kylania for the demo mission and great help.

    It works fine after testing a few times. Ocassionally, as you said, the lead heli moving to Patrol Point. I have noticed if you move spawn marker around the heli did land at LZ.

    I saw you said you had three helicopters but only saw 2 land. I have added HR3 to script but still end up with two .. any hints how to add 3rd Heli is appreciated :D

    Over all great work! Thanks. :bounce3:


  3. Thanks kylania for your great help. The scripts works great as is. I thought it might be like the Norrin UPS script where you can spawn any units be it BIS or addons without any codes. Since the BIS function spawn is new I was not sure how easy/hard it would be to modify spawn.

    I have managed finally to get a second group of helicopters to work and drop troops as well. :yay:

    As to why have troops fly in vs just spawn near objective, one of the objectives is to clear and secure landing zone while troops keep cominging in.

    As it stands, it works mostly, I just have to figure how to get troops to move to target.

    Thanks again for the great help.

    :cheers:


  4. Thanks kylania, this is what I was exactly looking and more!

    Only question is I wanted to add a couple more helicopters to land in another location but somehow only one spawning. I have included the two scripts that I modiefied for 2nd groupof Helipcopters.

    The other questions:

    - is how to make the infantry "attack" at FULL speed ?

    - How do you specify how large squad spawned in helicopter? are their size pre determined?

    - Can you just replace units with 3rd party addons class names in script? Like desert soldiers, Ch-47 Heli?

    Thanks for your great help.

    //////////////////////////////////////////////////////////////////

    // Function file for Armed Assault

    // Created by: 1ID-CPL. Venori

    //////////////////////////////////////////////////////////////////

    // Preplace 2 markers.

    // "HP_SPAWN2" where you want the helos to start from and "reload" at.

    // "HP_LZ2" where you want the helos to land.

    // Only spawn once, on the server.

    if(!isServer) exitWith{};

    // Number of waves to bring in.

    HR_wavecount = 5;

    publicvariable "HR_wavecount";

    // Create the group with 2 MH-60S

    HR_flightgroup = creategroup west;

    HR3 = ([getMarkerPos "HR_SPAWN2", 45, "MH60S", HR_flightgroup] call BIS_fnc_spawnVehicle) select 0;

    HR3 setVehicleVarName "HR3";

    publicvariable "HR3";

    sleep 5;

    HR4 = ([getMarkerPos "HR_SPAWN2", 45, "MH60S", HR_flightgroup] call BIS_fnc_spawnVehicle) select 0;

    HR4 setVehicleVarName "HR4";

    publicvariable "HR4";

    // Make them fly pretty.

    HR_flightgroup setFormation "COLUMN";

    HR_flightgroup setBehaviour "CARELESS";

    HR1 flyinHeight 35;

    HR2 flyinHeight 40; // when flying at the same height they seemed to "wave" a lot.

    // Spawn the first wave.

    [hr_flightgroup, "HR_LZ2"] execVM "HR_spawnGroup2.sqf";

    // Debug ride-along :)

    p1 assignAsCargo HR4;

    p1 moveinCargo HR4;

    // Set the waypoints for the helo group. Their origin point is waypoint 0.

    _wp = HR_flightgroup addWaypoint [getMarkerpos "HR_LZ2", 1]; // waypoint at the LZ marker.

    _wp1 = HR_flightgroup addWaypoint [getMarkerPos "HR_SPAWN2", 1]; // waypoint back at the spawn marker.

    _wp2 = HR_flightgroup addWaypoint [getMarkerPos "HR_SPAWN2", 1]; // Cycle waypoint at spawn marker too.

    [hr_flightgroup, 1] setWaypointType "TR UNLOAD"; // Set the 1 (second actual waypoint, hence 1 instead of 0) to TRANSPORT UNLOAD.

    [hr_flightgroup, 2] setWaypointType "MOVE"; // set the 2 waypoint to MOVE with the following call to spawn another group:

    [hr_flightgroup, 2] setWaypointStatements ["true", "nul = [hr_flightgroup, ""HR_LZ""] execVM ""HR_spawnGroup.sqf"""];

    [hr_flightgroup, 3] setWaypointType "CYCLE"; // set the 3 waypoint to CYCLE

    ----------------

    //////////////////////////////////////////////////////////////////

    // Function file for Armed Assault

    // Created by: 1ID-CPL. Venori

    //////////////////////////////////////////////////////////////////

    // Called via waypoint with:

    // nul = [hr_flightgroup, "HR_LZ2"] execVM "HR_spawnGroup2.sqf";

    // Grab the input arguments

    _helogroup = _this select 0;

    _lz2 = _this select 1; // marker name.

    // Distance between waypoints for the infantry's patrol waypoints.

    _max_dist_between_waypoints = 100;

    // Random types of groups to spawn.

    _grouptypes = ["USMC_FireTeam","USMC_FireTeam_MG","USMC_FireTeam_AT","USMC_FireTeam_Support","USMC_HeavyATTeam"];

    // Only do this if we're the server...

    if(!isServer) exitWith{};

    // As long as we haven't done all the waves, lets make new ones!

    if (HR_wavecount > 0) then {

    // If the first bird is alive...

    if (alive HR3) then {

    // Get a random group type and spawn it. Do this twice.

    _grouptype = floor (random count _grouptypes);

    _grp5 = [[0,0,0], west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> _grouptypes select _grouptype)] call BIS_fnc_spawnGroup;

    _grouptype = floor (random count _grouptypes);

    _grp6 = [[0,0,0], west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> _grouptypes select _grouptype)] call BIS_fnc_spawnGroup;

    // Assign them and move them to cargo so the helos know they have cargo.

    {_x assignAsCargo HR3;_x moveInCargo HR3} forEach units _grp5;

    {_x assignAsCargo HR3;_x moveInCargo HR3} forEach units _grp6;

    // Not entirely sure we need this, but seemed to cut down on deaths upon disembarkment.

    _wp = _grp5 addWaypoint [getMarkerpos _lz2, 1];

    [_grp5, 1] setWaypointType "GETOUT";

    _wp = _grp6 addWaypoint [getMarkerpos _lz2, 1];

    [_grp6, 2] setWaypointType "GETOUT";

    // Set group 1 and 2 up to patrol at the LZ.

    [_grp5, (getMarkerpos _lz2), _max_dist_between_waypoints] call BIS_fnc_taskPatrol;

    [_grp6, (getMarkerpos _lz2), _max_dist_between_waypoints] call BIS_fnc_taskPatrol;

    };

    // if the second bird is alive...

    if (alive HR4) then {

    // Get a random group type and spawn it. Do this twice.

    _grouptype = floor (random count _grouptypes);

    _grp7 = [[0,0,0], west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> _grouptypes select _grouptype)] call BIS_fnc_spawnGroup;

    _grouptype = floor (random count _grouptypes);

    _grp8 = [[0,0,0], west, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> _grouptypes select _grouptype)] call BIS_fnc_spawnGroup;

    // Assign the groups as cargo and move them into the bird.

    {_x assignAsCargo HR2;_x moveInCargo HR4} forEach units _grp7;

    {_x assignAsCargo HR2;_x moveInCargo HR4} forEach units _grp8;

    // Safety waypoint...

    _wp = _grp7 addWaypoint [getMarkerpos _lz2, 1];

    [_grp7, 1] setWaypointType "GETOUT";

    _wp = _grp4 addWaypoint [getMarkerpos _lz, 1];

    [_grp8, 1] setWaypointType "GETOUT";

    // Have groups 3 and 4 patrol as well.

    [_grp7, (getMarkerpos _lz2), _max_dist_between_waypoints] call BIS_fnc_taskPatrol;

    [_grp8, (getMarkerpos _lz2), _max_dist_between_waypoints] call BIS_fnc_taskPatrol;

    };

    // Alert the player that reinforcements are coming.

    _msg = format["Wave %1 spawned",HR_wavecount];

    _nic = [nil,nil,rHINT,_msg] call RE;

    // Reduce the wave count

    HR_wavecount = HR_wavecount - 1;

    publicvariable "HR_wavecount";

    } else {

    // Once we've done all the waves, delete the flight group.

    _nic = [nil,nil,rHINT,"Reinforcements no longer available!"] call RE;

    {{deleteVehicle _x} forEach crew _x;} foreach units HR_flightgroup;

    {deleteVehicle _x} foreach units HR_flightgroup;

    };


  5. Thanks kylania for your response. I thought it might be more complicated than what I initialy thopught :)

    What I am trying to do

    I am making a mission where Helicopters will continue landing and unloading troops then take off again to bring more troops to battle field.If a helicopter is shut down no more troops.

    How?

    Having helicopter fly through waypoints and everytime they reached a certain wp troops got created and moved inside helicopter. Then heli will just unload them next WP. Add cycle waypoint for the chopper so process is repeated.

    WP1 = move - init field activate script to creat troops and move them to heli

    WP2= Unload in battle field

    WP3= Cycle

    and process gets repeated

    Troops will have their own WP so they can move after unload.

    Does that make sense? Any easier way of doing it? :confused:

    Thanks for your help.


  6. Thanks, you guys were right, the typo along with the missing marine fixed it, thanks so much for a great script.

    Only question is how do you fire script through a trigger?

    What I am trying to do is an escort mission where 2 fighter jets escorting a civ plane get intercepted when they enter an area (trig activates script and spawn enemy planes to intercept) (I assume if you replace traget marker name with civ plane, enemy planes will persue civ plane?).

    Thanks for script and help.


  7. Great script Raddik, thanks for sharing.

    I am having "technical" diffuculty spawning F35B.

    Could you please point out what I am doing wrong?

    private["_delay"];

    F35SPAWN_Pos=[(getmarkerpos "F35BSPAWN") select 0,(getmarkerpos "F35BSPAWN") select 1,((getmarkerpos "F35BSPAWN")select 2)+100];

    waituntil {!isNil "bis_fnc_init"};

    _delay=5;

    GroupWAIR1 = createGroup west;

    F35BCount= 0;

    F35B= objNull;

    while{F35Count < 2}do{

    if(isServer)then{

    if(!alive F35B)then{

    sleep _delay; // seconds to delay the deletion after vehicle is killed

    {deletevehicle _x}foreach crew vehicle F35B; // deletes all mebers of the vehicle crew

    deletevehicle F35B;

    F35B= ([F35BSPAWN_Pos, 0, "F35B", GroupWAIR1] call BIS_fnc_spawnVehicle) select 0;

    F35B setVehicleVarName "F35B";

    wp1= GroupWAIR1 addWaypoint [(getmarkerpos "F35BTARGET"), 0];

    wp1 setWaypointSpeed "FULL";

    wp1 setWaypointType "SAD";

    F35BCount= F35BCount+1;

    publicvariable "F35BCount";

    publicvariable "F35B";

    };

    };

    sleep 30; // delay to save system performance;

    };

    sleep 1;


  8. Hey BIG,

    Can't you stop with spamming in every thread about Armaholic, first of all your downloads are slow like hell and can't download it from there. Can't you stay on your own forums, playing the "good guy" there. To missionmakers out there. Please upload it too Ofpec.com or filefront. News sites come and go..

    Armaholic is a great Arma website which I use often. Your uncalled for comments are out of line.


  9. Thanks for everyone's feedback.

    Although I used Sentinel Weapons addon I did not believe it would be required as it is not used as an addon in actual mission. It just converts weapons to High Disp if it is there and should works without. I played same mission on LAN without.

    So could someone please confirm if mission says it is required?

    Thanks Binesi for the tips and feedback.

    - The teleoprt was for testing and I forgot to remove from release version.

    - The few "zombie" units are there for surprise ambush but the issue is once you have found them it is easy to get around them. I will play with dostop command and test and be more "creative" next time.

    - Artillery, I am testing something different and will be in next version.

    - I have a few designed "tough" defenses for airport in next version.

    Did you find it balanced? too easy? too hard?

    Again, thanks for everyone's feedback.


  10. Take the Airport

    So this is my first released mission and I appreciate constructive feed back.

    I have always wanted a LARGE scale combat mission and this is a large scale with tanks, planes, helicopters, paratroopers, heli insertion, artillery and ofcourse tons of infantry!

    The mission objectives:

    - Clear and Secure landing zone for Delta company whol will be insetred in LZ.

    - Assist in taking the village of Vybor

    - Finally primary objective assist Delta Company in taking airfield.

    Direct Command: You have direct command of 3 infantry squads and 1 tank platoon and 2 AAV7. You also have artillery for fire mission support.

    Allies: Delta Company will be inserted by helicopters in LZ.

    Air Support:

    - F35 Squadron + A10 Squadron (no direct control)

    - Apachie sqadron for close ground support/supression (no direct control)

    Enemy: approx 800 troops backed by approx 20 tanks and air support (sqaudrons of Su34 and SU25 and 1 squadron of K50.

    Artillery (please see read me on how to use)

    This missions uses Hypered High Command (by Mr_Centipede) (please see read me on how to use)

    This mission was designed to give player some control (over his troops via HC) yet be part of a larger group in operation.

    This mission is 5th version release and I am looking forward to your feedback.

    Addons needed (and included in file):

    - Sentinel Weapons (addon by Archangel)

    Reduce the ability of the AI's to inflict first round kills on both human and other AI opponents at long range. This not only increases the duration of firefights but also gives human players a chance to fire back without being killed outright -although this can and does still happen the frequency has been reduced to almost realistic levels, thus adding to the overall atmosphere of the game. It all about atmosphere after all :)

    - PMC Apache (addon by Snake Man)

    Purpose of this addon is to have a helicopter that actualy can give close ground support!

    VOP sound mod 2.1 Best sound mod IMO and adds to atmosphere (not included in file but click on below link to download:

    http://www.armaholic.com/page.php?id=5884

    ----------------------------------------------------------------------

    Here is the latest version (1.5) which is close to final release version.

    It has a hot fix for artillery (now works in MP) and you should see some interesting air show during mission! :)

    V1.5:

    Filefront: http://www.filefront.com/14485767/Operation_Takeairport.rar

    ----------------------------------------------------------------------

    I am working on final release version where enemy will use artillery against your forces position!


  11. BTW it amazes me that I still see a lot of uninformed comments around various boards by fairly authoritative people that HC doesn't work in MP mode or is limited. They must have looked at it in version 1.0 for about ten seconds and made a snap judgment.

    Los

    I have tested HC heavily in MP and it does work except for infantry. They usually stop responding halfway through the mission. This applies to infantry groups. Leader of group issues commands to move to x directions y meters away but nothing happens. This is not an issue at all with vehciles/planes.

    I hope there is a way to fix it.

    But good work here.

×