Squirtman 5 Posted May 13, 2017 I'm trying to use createUnit to spawn a single unit standing on the walkway of the southern lighthouse on stratis, the exact coordinates of which are [2713.106,951.223,19.593]. I can get the unit to spawn in the correct position on the x and y axis but the z axis coordinate does not seem to be getting passed. I've tried using a numerical array for position (the commented line in the code below), a marker which i set on the map (the uncommented lines), and i even tried spawning it on an invisible object using getPosAsl but no matter what method i use the unit always spawns at ground level directly below where i want him to spawn. Does anyone know how to pass a 3D position to createUnit, or is there another way to accomplish spawning a single unit using 3 dimensions. Or am I Merely asking too much of the arma engine with this, any help and/or examples would be appreciated. mark = getMarkerPos "tcmarker"; //"O_sniper_f" createUnit [[2713.106,951.223,19.593],csatg]; "O_sniper_f" createUnit [mark,csatg]; Share this post Link to post Share on other sites
Grumpy Old Man 3551 Posted May 13, 2017 Try using setPosATL after spawning the unit: _sniper = csatg createUnit ["O_sniper_f",[0,0,0],[],0,"NONE"]; _sniper setposATL [2713.106,951.223,19.593]; You need to use the regular syntax of createUnit for this, since the alternate one does not return the spawned unit, so setposATL wouldn't work. Cheers Share this post Link to post Share on other sites
Squirtman 5 Posted May 13, 2017 i tried using regular syntax first but every time i did i would get an error message upon code execution saying _sniper = csatg |#|createUnit ["O_sniper_f"... error type array, expected number I was using the actual coordinates i wanted the unit at as opposed to [0,0,0] so that for some strange reason may be the issue. But i'll give it a try when i get back from some BS i have to do. Thanks for the reply. Edit: Upon testing the code you sent me it is working perfectly. Many thanks Grumpy Old Man Share this post Link to post Share on other sites