Jump to content
Sign in to follow this  
kdk11

little bird skid like sitting option on other helis?

Recommended Posts

does anyone know how to get units to sit on the side of lets say the mohawk like they do on the little birds skids? I would be like to be able to make units sit at the doors of helis like they sit on the skids of the little birds.

like so

A6DA92837FC07E2517E5ABE237DE72360A837D07

Edited by KDK11

Share this post


Link to post
Share on other sites

It is possible, but requires a lot of tweaking and workarounds. Its more of a hack job since you would need an addon to do the job properly.

1) Add an action to the chopper for the special seat

2) Use attachTo to stick the unit in place

3) Set the unit to face the correct direction

4) Set the unit into the sitting animation

5) Fade the volume for that player whilst onboard (Else the chopper noises drown out the world)

6) Add an action to the player to disembark/detach

Share this post


Link to post
Share on other sites

Thanks mate. Looks doable with a little bit of research. One thing I would like to ask you is, Do you know how to add the action to the chopper for special seats?

Share this post


Link to post
Share on other sites

You would probably need to do one of the following:

a) Create a dialog from a single action with a picture of the aircraft with clickable buttons relative to the free seats.

b) Create an action for EACH seat ie Get in Rear Left External, Get in Front Right External etc

You will also need to have a check to see if anyone is already in the desired location.

You can add a simple action by putting this in the chopper init box:

this addAction ["Get in external seat","externalSeat.sqf"];

The externalSeat.sqf script would look like

_chopper = _this select 0;
_unit = _this select 1;
_unit attachTo[chopper[0,0,0]];

Share this post


Link to post
Share on other sites

Hmmmm ok guess this will be something I need to play around with and get used to. Thanks for your help though! I will report back if I manage to do it.

Share this post


Link to post
Share on other sites

At the moment using what you gave me I have managed to do this

2A15EBBAE82B0CAE3B79F5A8C2813B94541B1FFF

Now to try figure out how to sit him down

c2 = _this select 0;
d1 = _this select 1;
d1 attachTo [c2,[1,2,-2.5]];
d1 setVectorDirAndUp [[1,0,0],[0,0,1]];
d1 switchMove "ActsPsitMstpSnonWnonDnon_varSittingOnTheWall"

However he refuses to sit. I also tried "playMove". maybe this is where I need to figure out how to do this

1) Add an action to the chopper for the special seat
Edited by KDK11

Share this post


Link to post
Share on other sites

I used a different one that has pretty much the same outcome. So the next thing would be this, at the moment you can get in this seat from outside the chopper. How would I go about making the option only possible when sitting in a cargo seat in the back of the heli? So when you are sat in cargo flying you can then scroll down to move into position at the door? Also am thinking maybe code it so it only works once that side door is opened? Another thing I have noticed is I am unable to use "alt" to freelook once in this position? Anyone know why that might be happening? I am able to zoom in and out but that is it

DE40CB5BD1801C4962625EDFD7E46758800DA848

Edited by KDK11

Share this post


Link to post
Share on other sites
...

Another thing I have noticed is I am unable to use "alt" to freelook once in this position? Anyone know why that might be happening? I am able to zoom in and out but that is it

That's a bug with the game.

Share this post


Link to post
Share on other sites

Ah dam! Upvoted that though thanks :)

Share this post


Link to post
Share on other sites

try something like this for the addaction.

the condition at the end is all that needs tweaking. the number is how high up the list the option is on the addaction.

I would also add a variable to show the seat is taken so others don't try to get in the same seat.

eg. in the externalseat.sqf have a line

choppername setvariable ["ExtSeatFull",1];

this addAction ["Get in external seat","externalSeat.sqf",[],5,false,false,"","(player in _this) && (player !=driver _this) && (player !=gunner _this) && (_this getvariable ""ExtSeatFull""==0)"];

i am not 100% on the correct seat names for the pilot and co-pilot in this chopper, but the part in italics may need looking into.

(player !=driver _this) && (player !=gunner _this)

I assume you will have a get out of this seat option. so you will want to reset the variable back to 0 (or anything other than 1).

i cannot recall the correct code for the door open detection or if there even is a way to check if the door is open, but that would just go at the end of the condition.

Edited by KevsnoTrev

Share this post


Link to post
Share on other sites

Thanks man I will look into everything you just said. I have not yet added an "eject" system to the seat as to be honest I dont know how.

Share this post


Link to post
Share on other sites

^^ oops, the getvariable in the condition should be 0 - corrected previous post now.

I would be interested to know if the player was still occupying a seat in the cargo space when in the animation at the door.

Have a look at this as it is possible you can modify or use part of the code to make yours work - it is for A2 so commands should work, just update class names.

it uses setvehicleInit which was disabled in A3 as it could be hacked in game.

Share this post


Link to post
Share on other sites

Too much code for me to understand lol

Share this post


Link to post
Share on other sites

yeah, understandable KDK11.

To me it looks like they have detach, then a moveincargo to put the player back in the inside of the chopper. --> it might be an idea to make sure the chopper is off the ground before enabling this system so the chopper isn't over filled.

i am not sure why they use setvehicleInit and processInitCommands, but both are disabled with A3 and bis_fnc_mp needs to be used instead.

I have modified this other script and have the player move to the door and go back, but there is a loop that prevents keys being pressed - i will look into this a bit more.

I also didn't open the door! oops. more work to do. I might make the door open as part of the move.

Edited by KevsnoTrev
damned phone autocorect. always spelling mistakes.

Share this post


Link to post
Share on other sites

If you could get this working I would be extremely thankful. I posted in the Addons & Mods forum but no one seems to want to help me with what I am trying to make. And my coding is well...Poor! I dont understand most of it. I like to retexture because I know how to do it lol But I need pros like yourself helping me out here and there :P

Share this post


Link to post
Share on other sites

Which animation did you end up using,I can't get the guy to sit down on the edge. he stands with gun ready.

^^ thanks but not a pro, just trying.

Share this post


Link to post
Share on other sites

I had to use an animation from the AiA mod because arma 3 lacks in animations imo. but if you have AiA it is "ActsPsitMstpSnonWnonDnon_Tortured01"

Share this post


Link to post
Share on other sites

Am I right in thinking when a player is in attachto 'mode' there is no scroll menu?

I have put in an addaction to let them return to their seat but no such luck on it showing up.

Share this post


Link to post
Share on other sites

I think you have to assign it to a certain key rather then scroll. Looking through those SQF's on that mission you posted from arma 2. He has set it to "insert".

Share this post


Link to post
Share on other sites

yeah I saw that ,but it locks out all keyboard actions so even quitting the editor for testing can't be done as its not looking for the 'esc' key.

Share this post


Link to post
Share on other sites

Take a look at this project. It uses the "User Action Key". Using existing keys is probably a much better solution than trying to hard code and take over a specific key that someone might have mapped to something else.

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  

×