Jump to content
Sign in to follow this  
JNE

Need help with creating a co-pilot seat in the L39ZA (Takistani)!

Recommended Posts

I have two problems, Being very new to Arma 2 editing: Please be simple.

My First problem is I am trying to create a co-pilot seat I have created it, It seems to work I get in then get out, after getting both the Pilot and Co-pilot menus have disapeared and are not accessable.

My Second problem is I need to convert it to multiplayer (This is less of a priority of the first).

My Code:

L39ZA Initiation Field:

null = [player] execVM "chair.sqf";

Mission Initiation Script:

_copilot =  p addAction ["Get in L-39ZA as co-pilot", "copilot.sqf","",2,false,false];

Script chair.sqf:

myChair = "FoldChair_With_Cargo" createVehicle getPos player;  myChair attachTo [p, [0,0.6,0]];

Script copilot.sqf:

player moveInCargo myChair;

Please make it simple enough for a newbie like me to understand, Thanks and if you reqest more information, ask.

Share this post


Link to post
Share on other sites

player attachTo[p,[0,0,0]];

If you're gonna do something as ridiculous as duct tape a lawn chair to an aircraft might as well go balls deep and just attach the player to the plane and skip the fussy bits.

The problem you're having with the menus is that you're not actually IN the plane, you're IN the chair. So the only menu's you'd have would be chair menus. So you'd need to add actions to replicate that kind of thing to the player one he's "in" the plane/chair. There's really no "simple enough" way to do that really.

You could also figure out the config to add a second player and submit it here. :)

Share this post


Link to post
Share on other sites

If you're gonna do something as ridiculous as duct tape a lawn chair to an aircraft might as well go balls deep and just attach the player to the plane and skip the fussy bits.

Classic...:D I shouldn't have been taking a drink while reading this...

Share this post


Link to post
Share on other sites

Seriously, forget about adding that chair unless you really need it as your personal eye candy :D

You'd need a different logic to achieve what you want:

1. Add a permanent action to the plane such as "Get in as CoPilot" which triggers "getinco.sqf" (for example)

2. "getinco.sqf" attaches the *caller of the action* to the plane like you do already

3. "getinco.sqf" then assigns an action "Get out" to the *caller of the action* which triggers "getoutco.sqf"

4. "getoutco.sqf" detaches the caller from the plane and removes the action from the caller

Somewhere in the scripting wiki you'll find all useful information about action parameters in order to determine the caller of an AddAction menu entry. Of course it's only a workaround for a second seat but it can work this way. Attaching objects to each other works in realtime on clients. If you run the same on a server clients will observe a delay in positioning of the 2 objects - which somtimes looks really odd. As said... workaround. If you need a real 2seater you'd need to edit the model configuration indeed.

VictorFarbau

Edited by VictorFarbau

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
Sign in to follow this  

×