kdk11 1 Posted August 12, 2013 (edited) 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 Edited August 12, 2013 by KDK11 Share this post Link to post Share on other sites
Kushluk 21 Posted August 12, 2013 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
kdk11 1 Posted August 12, 2013 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
Kushluk 21 Posted August 12, 2013 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
kdk11 1 Posted August 12, 2013 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
kdk11 1 Posted August 12, 2013 (edited) At the moment using what you gave me I have managed to do this 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 August 12, 2013 by KDK11 Share this post Link to post Share on other sites
kylania 568 Posted August 12, 2013 Maybe play the animation before attachTo? Share this post Link to post Share on other sites
kdk11 1 Posted August 12, 2013 (edited) 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 Edited August 12, 2013 by KDK11 Share this post Link to post Share on other sites
Sniperwolf572 758 Posted August 12, 2013 ...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
kdk11 1 Posted August 12, 2013 Ah dam! Upvoted that though thanks :) Share this post Link to post Share on other sites
KevsNoTrev 44 Posted August 12, 2013 (edited) 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 August 12, 2013 by KevsnoTrev Share this post Link to post Share on other sites
kdk11 1 Posted August 12, 2013 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
KevsNoTrev 44 Posted August 12, 2013 ^^ 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
kdk11 1 Posted August 13, 2013 Too much code for me to understand lol Share this post Link to post Share on other sites
KevsNoTrev 44 Posted August 13, 2013 (edited) 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 August 14, 2013 by KevsnoTrev damned phone autocorect. always spelling mistakes. Share this post Link to post Share on other sites
kdk11 1 Posted August 14, 2013 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
KevsNoTrev 44 Posted August 14, 2013 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
kdk11 1 Posted August 14, 2013 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
KevsNoTrev 44 Posted August 14, 2013 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
kdk11 1 Posted August 14, 2013 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
KevsNoTrev 44 Posted August 14, 2013 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
kylania 568 Posted August 14, 2013 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
KevsNoTrev 44 Posted August 14, 2013 Thanks kylania will take a look. Share this post Link to post Share on other sites
kdk11 1 Posted August 16, 2013 Having much luck mate? Share this post Link to post Share on other sites
KevsNoTrev 44 Posted August 16, 2013 sorry got delayed, work and family......trying soon Share this post Link to post Share on other sites