DY357LX Posted July 11, 2014 Report Share Posted July 11, 2014 Maybe it's just me, but whenever I spawn a building/object via Infistar, it seems to go in a random spot. It's pretty difficult to place objects accurately. So, when I found out you could make a file called admin_start.sqf in your ArmA 2 Operation Arrowhead folder and press ALT+F11 to execute the script, I made this script to make my placements more accurate. (This code will place the object directly on your head so make sure to have God Mode on.) Make a file called admin_start.sqf in your ArmA 2 Operation Arrowhead folder (same folder as your ArmA2OA.exe) then paste this code in: _objectPlaced = "Land_Misc_Cargo2C"; // Automagically grab position of player (for output later). _objectPosition = (getPos player); // Spawn object on top of player. _placement = _objectPlaced createVehicle getPos player; // Set its position to ontop of the player _placement setPos (getPos player); // Get the direction the player is facing + alter rotation _placement setDir (getDir player + 180); // Wait 3 seconds sleep 3; // Set the height of the object (in meters) if required //_placement setPos [(getPos _placement) select 0, (getPos _placement) select 1, 0.2]; systemchat format ["Placed %1 at %2 - remember to INSERT it into the database",_objectPlaced,_objectPosition]; Go ingame, position yourself, press ALT+F11. You can alt-tab out of the game to change the classname without having to restart the server. You can find classnames for almost everything here:http://www.armatechsquad.com/ArmA2Class151656165165341654165165165165f/index.php The code is very simple (probably not 100% perfect but t works) and commented to help. _objectPlaced = "Land_Misc_Cargo2C"; is where you place the classname of the object you wish to spawn. If you wish to set the height of the object, remove the "//" from the line, enable the Infistar Debug Monitor and use the last numbers in the brackets. For example: _placement setPos [(getPos _placement) select 0, (getPos _placement) select 1, 12.34]; will set the object to 12.34 (meters) in the air. I find this very useful for admin events and helping players position tricky objects in their bases. Thanks to: Infistar for the Admin Tools. BioHazard for assistance in testing. Donnovan 1 Link to comment Share on other sites More sharing options...
unerground2 Posted July 11, 2014 Report Share Posted July 11, 2014 Since the new AH Update you can move the buildings in a system simmilar to the epoch system and place them everywhere you want. THX to Infistar Link to comment Share on other sites More sharing options...
DY357LX Posted July 11, 2014 Author Report Share Posted July 11, 2014 Since the new AH Update you can move the buildings in a system simmilar to the epoch system and place them everywhere you want. THX to Infistar Really? That's cool. Thanks for letting us know. I guess people on older versions can test the code posted. Donnovan 1 Link to comment Share on other sites More sharing options...
cen Posted July 11, 2014 Report Share Posted July 11, 2014 Yea it's really well done. Donnovan 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now