Jump to content
roy86

Spawn Aircraft Carrier 'USS Freedom' Jets DLC

Recommended Posts

5 hours 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

 

I have the same problem.

 

No catapult option and no defense weapons.

 

I'm running an Epoch server and also using Infistar.

 

 

Share this post


Link to post
Share on other sites

wierd. Will test and see what I can do ;)

Share this post


Link to post
Share on other sites

We're also encountering the same issue on ours, we run A3 Exile on Tanoa, also using infistar, and have this in the init.sqf:

 

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 enableSimulationGlobal true;
    [_carrier] call BIS_fnc_Carrier01PosUpdate;
};

 

We thought we'd try adding the 'enablesimulation' part but it doesn't seem to have any effect, carrier still does the same with or without it. The carrier spawns fine, the arrestor cables work fine, auto landing works fine, doors work fine, just nothing comes up in the mouse menu when you get near the catapult in the plane.

Share this post


Link to post
Share on other sites

I wonder if this is an infistar thing? I guess that'd make sense seeing as infistar is there to block that sort of thing (i.e. menus being added by hackers to the mouse wheel option), and we haven't updated ours (not sure if a new update is out yet?)

As far as I know the catapult is the only thing on the ship that creates a new mouse wheel menu option too? please correct me if I'm wrong about that though.

 

EDIT: Well, I spawned in a couple of jets to be persistent, restarted the server with no infistar loaded, landed on carrier, still the same thing. No mouse menu for the catapult. So I don't think it's infistar.

Share this post


Link to post
Share on other sites

Hi all. 

Yeah glad its all of us having the problem. I did restart my sever and checked it again. One thing i did notice is when i stand on the ship and try and spawn a plane with infistar it just falls through the ship as if its not there.

I wonder if that is part of the problem too. Not infistar but the ship itself and the way its spawning in the world ?

Zeus

Share this post


Link to post
Share on other sites

Yeah it's weird - same thing here, however I can spawn ground vehicles on the deck in front of me, no issues. Just anything that flies doesn't spawn there

Share this post


Link to post
Share on other sites

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  :)

  • Like 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

hey roy86 I'm working on the same server as drunkenjawa. We have tried all the suggestions including removing ifserver. All we have managed to do is spawn two ACC's on top of each other because.. Arma.. 

We got it back to where we are spawning one, where we want it to be. Arresting cables work and doors work but Catapults aren't. Thought it might actually be a plane issue but doubt it. Don't think its infiSTAR as the other scroll menu options for arrest hook works fine. Any ideas?

 

Share this post


Link to post
Share on other sites

It's the local actions not being created across the network. Going to have to write a little bit of code ;) I'll post it up once ready.

Share this post


Link to post
Share on other sites

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.


 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Cables and doors are models and operate differently. The whole launch process is scripted, hence the addAction locality in MP is an issue for the catapults when spawning via script.

Share this post


Link to post
Share on other sites

I've been doing some digging around to get my catapult working on an exile server, looks like if I execute BIS_fnc_Carrier01PosUpdate and BIS_fnc_Carrier01Init on the carrier in initServer it spawns in with usable catapults.

 

Here is what I'm using to spawn in the carrier:

 

private _vehicles = [
["Land_Carrier_01_base_F", [7291.8, 1627.66, 0], [0.994672, -0.103089, 0], [0, 0, 1], true]
];

{
    private _vehicle = (_x select 0) createVehicle (_x select 1);
    _vehicle setPosASL (_x select 1);
    _vehicle setVectorDirAndUp [_x select 2, _x select 3];
	_vehicle call BIS_fnc_Carrier01PosUpdate;
	_vehicle call BIS_fnc_Carrier01Init;
    
}
forEach _vehicles;

Edit: I see now that this causes the Ship to be spawned in that location twice, i.e. you have to open a door twice to walk in

Edited by CodFather
Helpful Insight

Share this post


Link to post
Share on other sites

Part has to be spawned by the server. Client has to wait and then run a function to add the actions. I have worked out the solution, just need to test then I'll post. 

Share this post


Link to post
Share on other sites
34 minutes ago, roy86 said:

Part has to be spawned by the server. Client has to wait and then run a function to add the actions. I have worked out the solution, just need to test then I'll post. 

 

If you use BIS_fnc_Carrier01Init on the carrier in a remote location then use PosUpdate to place the carrier where you would like it then it will have the proper scripting that it is meant to have. here is the revised code that I am using, this will spawn in the carrier and will have the scripting run correctly on a server as well as not having a duplicate carrier in the same position. the only downside is that there will be a carrier where you initialized it, to fix this you can spawn it way off the map at like [-5000, -5000, -1000]

 

If your script is a good replica of what is in the game, @roy86, then yeah that would be worth it, otherwise this is a quick and easy work around. 

 

also @darthdan@live.com.au I think this can be run in init.sqf

private _vehicles = [
["Land_Carrier_01_base_F", [7291.8, 1627.66, 0], [0.994672, -0.103089, 0], [0, 0, 1], true]
];

{
	// spawn carrier in lower corner of map
    private _vehicle = (_x select 0) createVehicle (_x select 1);
    _vehicle setPosASL [0,0,-1000];
    _vehicle setVectorDirAndUp [_x select 2, _x select 3];
	_vehicle call BIS_fnc_Carrier01PosUpdate;

	// init carrier
	_vehicle call BIS_fnc_Carrier01Init;
	
	// put carrier where you want it
	_vehicle setPosASL (_x select 1);
	_vehicle call BIS_fnc_Carrier01PosUpdate;

}
forEach _vehicles;

 

Share this post


Link to post
Share on other sites

Well looks like we are certainly getting there. Using the above script, would the carrier be persistent or a fresh spawn per restart? Just thinking of planes etc on deck. 

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Does this look right? If so its not spawning the carrier at all.. but its probably not right lol.

 

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;
    };
};

Share this post


Link to post
Share on other sites

Your position is wrong. use brackets e.g. [7577.91,2066.26,0]

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×