Zombitch 10 Posted January 4, 2015 Hi, I am trying to stick building pieces together but can't succeed it. In fact I try to add an hospital in Startis. The hospital is composed of 3 differents parts that should be "merged". I tried to play with setPos, setPosASL but never succeed. Here is what I get : You see, the three parts are "disconnected" and are not at the same level (I mean the slide 1 is lower than the main part) Does anyone know how to assemble this hospital ? Thanks ! NB : Don't tell me I have to place them manually :p NB2 : I don't know if it's important but I always use "this setVectorUp [0,0,1]" in the init field of my buildings, in order to get my buildings vertically. Share this post Link to post Share on other sites
das attorney 858 Posted January 4, 2015 Somebody asked this a while ago so if you use the search function in this forum you will find the thread. Share this post Link to post Share on other sites
killzone_kid 1331 Posted January 4, 2015 Don't mind the sliding doors part http://killzonekid.com/arma-scripting-tutorials-automating-sliding-doors-at-hospital/ Share this post Link to post Share on other sites
Zombitch 10 Posted January 4, 2015 Don't mind the sliding doors part http://killzonekid.com/arma-scripting-tutorials-automating-sliding-doors-at-hospital/ Wow, thanks a lot, it works like a charm. Here is what I've done thanks to your code : 1) Add a game logic named "Hospital" 2) Copy paste this code in the game logic init fields hs = createVehicle ["Land_Hospital_main_F", [0,0,0], [], 0, "NONE"]; hs setDir (getDir this); hs setPosATL (getPosATL this); var = createVehicle ["Land_Hospital_side1_F", [0,0,0], [], 0, "NONE"]; var attachTo [hs, [4.69775,32.6045,-0.1125]]; detach var; var = createVehicle ["Land_Hospital_side2_F", [0,0,0], [], 0, "NONE"]; var attachTo [hs, [-28.0336,-10.0317,0.0889387]]; detach var; Code is from Killzone_Kid 3) Then the hospital appears where is located the game logic Share this post Link to post Share on other sites
killzone_kid 1331 Posted January 4, 2015 This will create as many hospitals as players on the server + 1 for dedicated server if you use it in mp. It has to be server only execution to work properly. Share this post Link to post Share on other sites
Zombitch 10 Posted January 5, 2015 (edited) This will create as many hospitals as players on the server + 1 for dedicated server if you use it in mp. It has to be server only execution to work properly. You mean I have to check isServer ? Doing something like that : if (isServer) then { hs = createVehicle ["Land_Hospital_main_F", [0,0,0], [], 0, "NONE"]; hs setDir (getDir this); hs setPosATL (getPosATL this); var = createVehicle ["Land_Hospital_side1_F", [0,0,0], [], 0, "NONE"]; var attachTo [hs, [4.69775,32.6045,-0.1125]]; detach var; var = createVehicle ["Land_Hospital_side2_F", [0,0,0], [], 0, "NONE"]; var attachTo [hs, [-28.0336,-10.0317,0.0889387]]; detach var; }; Thanks again for your advice. Edited January 5, 2015 by Zombitch Share this post Link to post Share on other sites
jshock 513 Posted January 5, 2015 That would be correct, just don't forget the then and the semicolon at the end :). Share this post Link to post Share on other sites
Zombitch 10 Posted January 5, 2015 Thanks I fixed it ;) Share this post Link to post Share on other sites