dragonsyr 21 Posted December 11, 2013 i have a problem spawning units in a building. i use this command to get the position i want copytoclipboard str getposASL player; and this command for the spawn "B_Competitor_F" createVehicle [1907.89,5716.65,18.4575]; but the unit is spawned out of the building. if i use objects instead of units (ex "Chemlight_blue") then they spawned in the place that i want how can i do it??? thanks my goal is to spawn 3 units in the radiotower (in front of the consoles) ps. i search for it , i found 2 threats that is not related to my problem ,i found no help for this . Share this post Link to post Share on other sites
f2k sel 164 Posted December 11, 2013 (edited) Sorry that was wrong info. You confused me, are you spawning vehicles or units (soldiers) Units man=createGroup west ; man = grp createunit ["B_Competitor_F",[1907.89,5716.65,18.4575],[],0,"can_collide"]; Vehicles veh = createVehicle ["vehicle_name",[1907.89,5716.65,18.4575],[], 0, "can_collide"] ; Edited December 11, 2013 by F2k Sel Share this post Link to post Share on other sites
dragonsyr 21 Posted December 11, 2013 (edited) omg!!! you right about this... i try with this and the units spawn without errors but not in the place... .... ok i will try now with that you send.... ---------- Post added at 17:16 ---------- Previous post was at 17:11 ---------- what does the can_collide command??? ---------- Post added at 17:25 ---------- Previous post was at 17:16 ---------- _tg4 = "B_Competitor_F" createVehicle [1876.47,5725,5.51393]; i test this again and the unit spawn in the place i want (ground test) not in building.... now the next test.......---------- Post added at 17:37 ---------- Previous post was at 17:25 ---------- with this man=createGroup west ; man = grp createunit ["B_Competitor_F",[1907.89,5716.65,18.4575],[],0,"can_collide"]; i get error undefined variable in expression grp , when i run from a script. if i run this command from debug console , no errors but nothing spawned Edited December 11, 2013 by dragonsyr Share this post Link to post Share on other sites
f2k sel 164 Posted December 11, 2013 sorry typo grp=createGroup west ; can_collide allows the object/unit to spawn while in contact with another object Also using the full array is much less demanding on the CPU than "B_Competitor_F" createVehicle [1907.89,5716.65,18.4575];. Share this post Link to post Share on other sites
dragonsyr 21 Posted December 11, 2013 grp=createGroup west ; man = grp createunit ["B_Competitor_F",[1906.7,5712.63,18.4587],[],0,"can_collide"]; works perfect ! and how can i make the unit facing in some direction? i tried and works with this man = grp createunit ["B_Competitor_F",[1906.7,5712.63,18.4587],[],0,"can_collide"]; man setDir 145 ; man disableAI "ANIM"; i use disable because without this the unit on spawn is facing 145 but after that return on default direction... ---------- Post added at 18:23 ---------- Previous post was at 18:11 ---------- and unarmed? Share this post Link to post Share on other sites
f2k sel 164 Posted December 11, 2013 man setformdir 145; may work for direction but they will turn to face an attack so you have to decide which works best. check out the removeallweapons , remove magazine ect commands http://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3 Share this post Link to post Share on other sites
dragonsyr 21 Posted December 11, 2013 thank you sir ! i set also man disableAI "AUTOTARGET" ; and i think this could be fine... Share this post Link to post Share on other sites