Jump to content

Soul4Ever

Member
  • Content Count

    6
  • Joined

  • Last visited

  • Medals

Posts posted by Soul4Ever


  1. Is the boat beached when this occurs? The only time I see this is if you run the boat aground. I would think that this is an arma3 issue to do with the exit positions of the boats.

    Yes the nose of the boat was touching the beach, and I am certain this inst related to Zen Framework because it happens with moveInDriver as well. Odd fact if you disembark into the water then drive the boat till its beached then disembark it doesn't shoot you into the air.


  2. Zen_MoveInVehicle defaults to cargo positions only, you must give the position type as 'all' to fill driver, gunner, etc. positions (remaining units are then put in passenger seats). You can also specify turret types in the next argument; however, the difference between gunner and commander is not always clear (copilots are commanders though).

    _AlphaBoatInsert = [_group_A11, _AlphaBoat, "All"] call Zen_MoveInVehicle;
    

    If you use moveInDriver, you need to sync it in MP (must run local to the unit). Zen_MoveInVehicle is doing that for you; it should also give an error if units must be left out. The order of putting units in with 'All' is: driver, turrets in order as returned by Zen_GetTurretPaths, passengers seats by index of moveInCargo from 0; occupied positions will be skipped.

    As an idea, if the team units are player1 to player5

    // dimension an array that holds all player units (as an example, but there are many ways to go about this)
    _arrayPlayers = [player1,player2,player3,player4,player5];
    
    // in editor, you create 2 insertion boats, named boat1 and boat2
    
    // at the correct point in the mission code, determine how many units are players
    // if > 4, use the second boat
    
    if (({isPlayer _x} count _arrayPlayers) > 4) then {
     [[player1,player2,player3],boat1] call Zen_MoveInVehicle;
     [[player4,player5],boat2] call Zen_MoveInVehicle;
     // you could, as Zen suggests, use the feature in his function to get a player as driver, or do it yourself, both achieve the result
     player1 moveInDriver boat1;
     player4 moveInDriver boat2;
    } else {
     [[player1,player2,player3,player4],boat1] call Zen_MoveInVehicle;
     player1 moveInDriver boat1;
     // cleanup the second boat if desired by deleting it now
    };
    

    There are many ways to make this more dynamic. You could use a few of Zens functions to mix things up as well. The idea is that you use some logic to handle problems. There are many things missing from this example. Its only meant to give you an idea on using an IF statement in such a situation :)

    Thanks for the replies! And I must apologize I totally missed the rest of the MoveInVehicle documentation, here the answer was right in front my eyes all along so sorry for that! Thanks for pointing it out Zen. I'll do better to make sure I read the documentation better next time.

    As far as including an if statement I don't really feel that comfortable with being able to code an entire mission myself yet. Certainly this framework or at least the basics of it I can handle so far. But, I'll keep at it and I am sure at some point I'll be ready to venture into more unstable waters again.


  3. try this

    https://community.bistudio.com/wiki/moveInDriver

    To solve 5 players, compose something like

    if (count of group > 4) then {
    move units to boat A which holds 8
    } else{
    move units to boat B which holds 4 max
    }
    
    

    You can use Zen functions to spawn the vehicle near the first if you need more than one boat for example. You could split the players up into 2 groups for 2 boats. You could use subs instead of boats if 5 players exist, you could change to heli if 5 exist... so many options lol.

    Thanks for the quick reply! Sorry I am still very new to this so I am sure I will be back for more advice, and I will try your suggestions out in the mean time. And your right about their being a lot of options, I am trying to stick with a boat insertion and a helo extraction for this mission tho. The group will clear their LZ in a future version. Correct me if I am wrong, the little bird has room for 6 just by looking at the model?

    Quick question, if I use the wiki method would I need to change the MoveInVehicle function to count unit 2,3, and 4 only if 1 is going to be the driver. so something like this?

    _A11 moveInDriver _AlphaBoat;
    0 = [[_A12, _A13, _A14], _AlphaBoat] call Zen_MoveInVehicle;
    

    yes that code worked great thanks for the link monkey! the code you posted looks a little advanced for my skill set as of yet lol


  4. I made my first mission for any Arma title ever with your framework! I've always been curious about coding a mission and always felt the editor lacked the documentation needed to effectively manipulate the units. Thanks to you tho, I now consider myself a scripting noob! hehe... Well anyways time to put away my dumb humor and say thanks to you for providing this wonderful tool/documentation for the community to use and learn with, I am really loving it!

    On to my question, I have a four player(and/or)AI unit being inserted by boat using your MoveInVehicle function. I have placed the boat as empty in the editor, and then used your function to teleport the group into it where they can then move to where they want to go. As my mission is currently scripted everything runs flawlessly except for one minor detail. When my group is moved into the boat they all fill passenger slots but not the driver(adding a fifth squad member doesn't work he gets left behind), this is fine for singleplayer just get out and back in as the driver. But, for MP I don't think many people would like to put up with that. I have used the spawnboat function and the spawncrew function as well, I like them and have plans to use them but for adaptability and reaction I'd like the players boat to be controlled by the player or players input lets insert here to hit this first etc... Is it possible to use your framework or any code for that matter to move the group into the boat and make one of them the driver?

    #include "Zen_FrameworkFunctions\Zen_InitHeader.sqf"

    #include "Zen_FrameworkFunctions\Zen_FrameworkLibrary.sqf"

    #include "Zen_FrameworkFunctions\Zen_StandardLibrary.sqf"

    // <Radio Silence> by <Soul>

    // Version = <0.1_2015-4-1>

    // Tested with ArmA 3 <1.40129533>

    // This will fade in from black, to hide jarring actions at mission start, this is optional and you can change the value

    titleText ["First In, Last Out", "BLACK FADED", 0.9];

    // SQF functions cannot continue running after loading a saved game, do not delete this line

    enableSaving [false, false];

    // All clients stop executing here, do not delete this line

    if (!isServer) exitWith {};

    // Execution stops until the mission begins (past briefing), do not delete this line

    sleep 1;

    // Enter the mission code here

    "MortarTeam" setMarkerAlpha 0;

    "CommOfficer" setMarkerAlpha 0;

    "APCStart" setMarkerAlpha 0;

    "APCEnd" setMarkerAlpha 0;

    "Beachhead" setMarkerAlpha 0;

    "LZBeach" setMarkerAlpha 0;

    "Patrol1" setMarkerAlpha 0;

    "Patrol2" setMarkerAlpha 0;

    "Patrol3" setMarkerAlpha 0;

    "Patrol4" setMarkerAlpha 0;

    "NorthPatrol1" setMarkerAlpha 0;

    "NorthPatrol2" setMarkerAlpha 0;

    _group_A11 = group A11;

    _AlphaBoat = AlphaBoat;

    _Ammo1 = Ammo1;

    _A11 = A11;

    _AlphaBoatInsert = [_group_A11, _AlphaBoat] call Zen_MoveInVehicle;

    _ResupplyObj = [_Ammo1, _group_A11, west, "Box", "reach"] call Zen_CreateObjective;

    _LGB_FireSupport = ["Bo_GBU12_LGB", 1, 1, 5, 10, 100, 25, true] call Zen_CreateFireSupport;

    0 = [_group_A11, _LGB_FireSupport, "Air Strike", 1, A11, "designator"] call Zen_AddFireSupportAction;

    _Patrol1Pos = ["Patrol1"] call Zen_FindGroundPosition;

    _Patrol1 = [_Patrol1Pos, east, 2, 3, "men"] call Zen_SpawnInfantry;

    0 = [_Patrol1, _Patrol1Pos] spawn Zen_OrderInfantryPatrol;

    _Patrol2Pos = ["Patrol2"] call Zen_FindGroundPosition;

    _Patrol2 = [_Patrol2Pos, east, 2, 3, "men"] call Zen_SpawnInfantry;

    0 = [_Patrol2, _Patrol2Pos] spawn Zen_OrderInfantryPatrol;

    _Patrol3Pos = ["Patrol3"] call Zen_FindGroundPosition;

    _Patrol3 = [_Patrol3Pos, east, 2, 3, "men"] call Zen_SpawnInfantry;

    0 = [_Patrol3, _Patrol3Pos] spawn Zen_OrderInfantryPatrol;

    _Patrol4Pos = ["Patrol4"] call Zen_FindGroundPosition;

    _Patrol4 = [_Patrol4Pos, east, 2, 3, "men"] call Zen_SpawnInfantry;

    0 = [_Patrol4, _Patrol4Pos] spawn Zen_OrderInfantryPatrol;

    _NorthPatrol1Pos = ["NorthPatrol1"] call Zen_FindGroundPosition;

    _NorthPatrol1Inf = [_NorthPatrol1Pos, east, 4, 6, "men"] call Zen_SpawnInfantry;

    0 = [_NorthPatrol1Inf, _NorthPatrol1Pos] spawn Zen_OrderInfantryPatrol;

    _NorthPatrol1APC = [_NorthPatrol1Pos, "O_APC_Wheeled_02_rcws_F"] call Zen_SpawnGroundVehicle;

    0 = [_NorthPatrol1APC, _NorthPatrol1Pos] spawn Zen_OrderVehiclePatrol;

    _NorthPatrol2Pos = ["NorthPatrol2"] call Zen_FindGroundPosition;

    _NorthPatrol2Inf = [_NorthPatrol2Pos, east, 4, 6, "men"] call Zen_SpawnInfantry;

    0 = [_NorthPatrol2Inf, _NorthPatrol2Pos] spawn Zen_OrderInfantryPatrol;

    _NorthPatrol2APC = [_NorthPatrol2Pos, "O_APC_Wheeled_02_rcws_F"] call Zen_SpawnGroundVehicle;

    0 = [_NorthPatrol2APC, _NorthPatrol2Pos] spawn Zen_OrderVehiclePatrol;

    _NorthPatrol2Pos = ["NorthPatrol2"] call Zen_FindGroundPosition;

    _NorthPatrol2Inf = [_NorthPatrol2Pos, east, 4, 6, "men"] call Zen_SpawnInfantry;

    0 = [_NorthPatrol2Inf, _NorthPatrol2Pos] spawn Zen_OrderInfantryPatrol;

    waituntil { sleep 5; [(_ResupplyObj select 1)] call Zen_AreTasksComplete };

    _MortarTeamPos = ["MortarTeam"] call Zen_FindGroundPosition;

    _MortarTeamObj = [_MortarTeamPos, _group_A11, east, "Mortar", "eliminate"] call Zen_CreateObjective;

    _MortarTeamGuard = [_MortarTeamPos, east, 3, 2, "men"] call Zen_SpawnInfantry;

    0 = [_MortarTeamGuard, _MortarTeamPos] spawn Zen_OrderInfantryPatrol;

    waituntil { sleep 5; [(_MortarTeamObj select 1)] call Zen_AreTasksComplete };

    _CommOfficerPos = ["CommOfficer"] call Zen_FindGroundPosition;

    _CommOfficerObj = [_CommOfficerPos, _group_A11, east, "Officer", "eliminate"] call Zen_CreateObjective;

    _CommOfficerGuard = [_CommOfficerPos, east, 3, 4, "men"] call Zen_SpawnInfantry;

    0 = [_CommOfficerGuard, _CommOfficerPos] spawn Zen_OrderInfantryPatrol;

    waituntil { sleep 5; [(_CommOfficerObj select 1)] call Zen_AreTasksComplete; };

    _APCStart = ["APCStart"] call Zen_FindGroundPosition;

    _APCEnd = ["APCEnd"] call Zen_FindGroundPosition;

    _OpforAPCObj = [_APCEnd, _group_A11, east, "Convoy", "eliminate", _APCStart, "normal", ["O_APC_Wheeled_02_rcws_F", "O_Truck_02_covered_F", "O_Truck_02_covered_F", "O_Truck_02_transport_F", "O_MRAP_02_hmg_F"]] call Zen_CreateObjective;

    waituntil { sleep 5; [(_OpforAPCObj select 1)] call Zen_AreTasksComplete };

    _BeachheadPos = ["Beachhead"] call Zen_FindGroundPosition;

    _BeachheadObj = [_BeachheadPos, _group_A11, east, "Officer", "eliminate"] call Zen_CreateObjective;

    _BeachheadGuard = [_BeachheadPos, east, 3, 2, "men"] call Zen_SpawnInfantry;

    0 = [_BeachheadGuard, _BeachheadPos] spawn Zen_OrderInfantryPatrol;

    waituntil { sleep 5; [(_BeachheadObj select 1)] call Zen_AreTasksComplete };

    endMission "end1"

    Thats the mission, the group is on Xiros at the start of the mission, the boat is down by Jay Cove. Thanks for any advice! On any part of my script not just the boat question!

×