Jump to content
Sign in to follow this  
doubleniner9

Does anyone know how to change spawn rotation on this script?

Recommended Posts

Hi all, I'm having a few issues with a script that I've come across and want to use. I've already used the current version of the script to spawn objects in with their default rotation, but now I'm wondering if there is any way to rotate them? getDir and getMarkerDir haven't worked for me so far, so any help is much appreciated.

here is the version of the script I'm currently using, for reference:
"Land_W_sharpRock_wallH" createVehicle getMarkerPos "marker0";
where "Land_W_sharpRock_wallH" is just an example object and "marker0" is the example marker I'm using as a spawn location.

P.S. I'm incredibly new to scripting stuff in arma, so please be kind to me, I'm just trying to learn, but with that said any criticism is welcome!

Share this post


Link to post
Share on other sites

Hi, welcome to the forum.
When you create object with createVehicle, you can see that it returns object. That means we can save the returned value into variable and we will have reference to that object. 
For this example I'm gonna  use global variable and will refer to it as "wall".
when you want to set direction to object, you can use setDir command.
so full script then looks like this

wall = "Land_W_sharpRock_wallH" createVehicle getMarkerPos "marker0";
wall setDir 45;

Assigning variables are basic thing to do in every scripting language. You will use it a lot.
You can read this article to better understand how scripting works in general.

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×