Jump to content

roy86

Member
  • Content Count

    483
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by roy86


  1. 27 minutes ago, Theassassinzz said:

    No, THANK YOU!!!

     

    I can not wait for PO4 to come out man, I've got about 70 people waiting for this mission to go live on a server haha.

     

    And I'd be more than glad to help you out here!!

     

    Keep up the good work man!! It will all be worth it in the end!!

    We're almost there :D

     

    Video of aircraft loadout has finished uploading.

     

    • Like 2

  2. On 2017-5-23 at 0:02 PM, Theassassinzz said:

    Well, if you ever need some compositions made up I can always lend a hand!!

     

    I can show you some custom ones I've made too haha

     

    On 2017-5-23 at 1:51 PM, kman_(kya) said:

     

    I could possibly help with compositions as well!

     

    Thanks guys, once Beta is out, I might take you up on that. I want a lot of variety and can't do it all.

    • Like 2

  3. Of course! I built one as part of the virtual depot. The new update has a lot of new commands so now I need to refine the UI, add some more features and should be good to go. Works in SP and MP.

    Here is a quick video of how it works (in test mode)

     

     

    Although... I do like what he's done. Might have a chat with GOM and see if we can share ideas.

     

    Cheers,


  4. To spawn/teleport to the deck of the carrier, I use setVehiclePosition command.

     

    Quote

    If position is in water and vehicle can float, it is placed on water surface, otherwise it is placed on the ground, even if ground is under water. If roof surfaces support walking (ie. Carrier Deck), units will be placed on roofs if such position is given.

     

    Command:

    vehicle player setVehiclePosition [<carrier_pos>,[],0,"None"];

     

    Tested and approved with MapClick ;) Try it in mission and regardless of the elevation, if you click anywhere on the carrier, you will be on its deck at that location.

    OnMapSingleClick "vehicle player setVehiclePosition [[_pos select 0, _pos select 1, 0],[],0,""None""]";

     

    • Like 1

  5. Ok.. after a bit of test, fix and learn, this now seems to work. Try this....
     

    Init.sqf

    if (isServer) then {
    	private _carrier = createVehicle ["Land_Carrier_01_base_F",getMarkerPos "marker_0",[],0,"None"];
    	_carrier setPosWorld getMarkerPos "marker_0";
    	_carrier setDir 270;
    	[_carrier] call BIS_fnc_Carrier01PosUpdate;
    	["Carrier %1 Found. Server Initilising.",_carrier] call BIS_fnc_logFormatServer;
    	missionNamespace setVariable ["USS_FREEDOM_CARRIER",_carrier]; publicVariable "USS_FREEDOM_CARRIER";
    } else {
    	[] spawn {
    		waitUntil { !(isNull (missionNamespace getVariable ["USS_FREEDOM_CARRIER",objNull])) };
    		["Carrier %1 Found. Client Initilising.",USS_FREEDOM_CARRIER] call BIS_fnc_logFormatServer;
    		if (count (USS_FREEDOM_CARRIER getVariable ["bis_carrierParts", []]) == 0) then {
    			["Carrier %1 is empty. Client Fixing.",str "bis_carrierParts"] call BIS_fnc_logFormatServer;
    			private _carrierPartsArray = (configFile >> "CfgVehicles" >> typeOf USS_FREEDOM_CARRIER >> "multiStructureParts") call BIS_fnc_getCfgDataArray;
    			private _partClasses = _carrierPartsArray apply {_x select 0};
    			private _nearbyCarrierParts = nearestObjects [USS_FREEDOM_CARRIER,_partClasses,500];
    			{
    				private _carrierPart = _x;
    				private _index = _forEachIndex;
    				{
    					if ((_carrierPart select 0) isEqualTo typeOf _x) exitWith { _carrierPart set [0,_x]; };
    				} forEach _nearbyCarrierParts;
    				_carrierPartsArray set [_index,_carrierPart];
    			} forEach _carrierPartsArray;
    			USS_FREEDOM_CARRIER setVariable ["bis_carrierParts",_nearbyCarrierParts];
    			["Carrier %1 was empty. Now contains %2.",str "bis_carrierParts",USS_FREEDOM_CARRIER getVariable ["bis_carrierParts", []]] call BIS_fnc_logFormatServer;
    		};
    		[USS_FREEDOM_CARRIER] spawn { sleep 1; _this call BIS_fnc_Carrier01Init};
    	};
    };

     

    • Like 1

  6. I've tested this and it spawned with actions:

    if (isServer) then {
        USS_FREEDOM_CARRIER = createVehicle ["Land_Carrier_01_base_F",[7577.91,2066.26,0],[],0,"None"];
        USS_FREEDOM_CARRIER setPosWorld [7577.91,2066.26,0];
        USS_FREEDOM_CARRIER setDir 270;
        [USS_FREEDOM_CARRIER] call BIS_fnc_Carrier01PosUpdate;
        publicVariable "USS_FREEDOM_CARRIER";
    } else {
        [] spawn {
            waitUntil {!(isNull (missionNamespace getVariable ["USS_FREEDOM_CARRIER",objNull]))};
            [USS_FREEDOM_CARRIER] call BIS_fnc_Carrier01Init;
        };
    };

     


  7. That doesn't really solve the issue with locality.

     

    Try this in the init.sqf

    if (isServer) then {
    	USS_FREEDOM_CARRIER = createVehicle ["Land_Carrier_01_base_F",<position>,[],0,"None"];
    	USS_FREEDOM_CARRIER setPosWorld <position>;
    	USS_FREEDOM_CARRIER setDir <degree>;
    	[USS_FREEDOM_CARRIER] call BIS_fnc_Carrier01PosUpdate;
    	publicVariable "USS_FREEDOM_CARRIER";
    } else {
    	[] spawn {
    		waitUntil {!(isNull (missionNamespace getVariable ["USS_FREEDOM_CARRIER",objNull]))};
    		[USS_FREEDOM_CARRIER] call BIS_fnc_Carrier01Init;
    	};
    };

    By making the server create the object and then share it with each of the clients to then run the init, I'm hoping this will solve the issue.


  8. Just now, darthdan@live.com.au said:

    Our mpmission innit.sqf is 

     

    if (isServer) then {
       private _carrier = createVehicle ["Land_Carrier_01_base_F",[7577.91,2066.26,0],[],0,"None"];
       _carrier setPosWorld [7577.91,2066.26,0];
    _carrier setDir 270;
    [_carrier] call BIS_fnc_Carrier01PosUpdate;
    };

     

    And in saying the catapults dont work, they might but we are unable to connect to them.


     

    It's the script that spawns the carrier does not support spawning in-game. It requires the actual ship to be placed. Will have to write a custom one that adds the actions across the network so that it works in MP.

    • Like 2

  9. OK, without writing my own function, I think I've worked it out.

    Remove the "isServer"!! it is already factored in the object spawning so should be ok.

     

    Now we just to check JIP so let me know. I've updated the first post to reflect this.

     

    2 hours ago, das attorney said:

    Hi Roy86,

     

    Thanks for figuring this shit out :)

     

    Also, are you the "Patrol Ops" guy?  If so, good work there too - lot's of hours on Arma 2 playing your mission with my mates  :)

    Cheers mate, yep one and the same ;) glad you liked it.

    • Like 2

  10. 25 minutes ago, gszeus said:

     

     

    Hi Roy86, would you know if the catapult system works on this ship as per using the code we spoke about above?  I have landed a fighter on the ship and it does appear the cables do slow you down. But when i drive the plane to the start of the catapult it gives me no options to attach or launch with it.

     

    Also the weapon systems do not appear on the ship. am I meant to be adding them separately?

     

    Zeus

    Can't say I've had a problem with the functions of the ship yet. Catapults work fine as well as the cables slowing down.

     

    the defenses are separate objects that need to placed on to the carrier. If someone gets me the offset positions I can write a script to place them.

×