Kydoimos 915 Posted June 27, 2013 Hi all! Is there a way to set the direction a spawned vehicle or item is facing? What's the script for this? I've tried this setdirection 90, etc. but no success! Share this post Link to post Share on other sites
Beerkan 71 Posted June 27, 2013 Point the marker where the vehicle spawns in the direction you want the spawned vehicle to face. Share this post Link to post Share on other sites
Kydoimos 915 Posted June 27, 2013 Thanks, but that's not what I mean. I mean, how do you select the direction of a 'scripted' spawn vehicle or item. For instance, if you spawn a weapon on the ground, or if you spawn a vehicle or building using a script, how do you set the azimuth? Share this post Link to post Share on other sites
kylania 567 Posted June 27, 2013 Use setDir setDirection is for map locations not objects. Share this post Link to post Share on other sites
Kydoimos 915 Posted June 27, 2013 I'm using an invisible helipad with the script: wreck = "Land_Wreck_Offroad_F" createVehicle position this; deleteVehicle this; But I can't set the azimuth, not even by rotating the original helipad object marker... ---------- Post added at 19:52 ---------- Previous post was at 19:46 ---------- That's fantastic Kylania - thanks again, works perfectly. ---------- Post added at 19:55 ---------- Previous post was at 19:52 ---------- I wonder if there's a similar command to set the elevation? I've had a look on the Arma3 scripting list and couldn't see anything obvious. Share this post Link to post Share on other sites
kylania 567 Posted June 27, 2013 Elevation is a bit tricky. It's gotten easier in the editor for scripting you have to do it the long way: An object's location has 3 elements, X, Y and Z. The Z is the elevation. X and Y are it's coordinates. So you'll setPos it to it's same location only with a higher Z. this setPosATL [getPosATL this select 0, getPosATL this select 1, 200]; So that example keeps the object in it's same X,Y location but puts it 200 meters up on the Z axis, 200 meters "up". I used setPosATL (above terrain level) since it's spectacularly faster than normal setPos. Also you usually only care about above terrain but sometimes you care about sea level so use setPosASL for that or be lazy and slow and use setPos. :) Share this post Link to post Share on other sites
Kydoimos 915 Posted June 27, 2013 You genius! Thanks so much! Works like a gem! Going to have some fun now I can place objects and control their direction and elevation etc. Cheers! Share this post Link to post Share on other sites