OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: The-Architect on 30 Oct 2008, 18:31:43

Title: Adding a hangar without a editor upgrade
Post by: The-Architect on 30 Oct 2008, 18:31:43
I recall there was a way to add objects without using an upgrade. I do have an upgrade but the hangar doesn't work. It's the curved hangar.
I could just get another upgrade that works properly but that would mean having to replace loads of other placed objects.

What is the way to add an object?
Title: Re: Adding a hangar without a editor upgrade
Post by: Zipper5 on 30 Oct 2008, 18:47:22
Is the editor upgrade you have the one that came with the 6thSense.eu Pack 1? That one doesn't add a requirement for the mission as it simply makes the buildings visible in the editor. Plus you won't have to replace any other objects on the map.

You can grab it from here:
http://www.armaholic.com/page.php?id=1486

Try it out.
Title: Re: Adding a hangar without a editor upgrade
Post by: Spooner on 30 Oct 2008, 18:49:44
You can use the 6thSense editor upgrade (http://www.armaholic.com/page.php?id=392) addon. It unlocks most of the standard buildings for you in the editor, but it is not required by anyone playing the mission!

You can also use the WarfareBAirport (http://www.ofpec.com/COMREF/cfg_images/ArmA/WarfareBAirport.jpg) from the Warfare mission which will be available to anyone using ArmA 1.14.
Title: Re: Adding a hangar without a editor upgrade
Post by: The-Architect on 31 Oct 2008, 00:35:00
Cool, thanks for that guys.

Still, I'd like to know how it's done if you could tell me.
Title: Re: Adding a hangar without a editor upgrade
Post by: Planck on 31 Oct 2008, 01:01:54
Not sure what you mean exactly unless you mean the classname to use for createVehicle.

The two hangars on Sara being

Land_SS_hangar
Land_SS_hangarD

and the Warfare hangar already mentioned by Spooner...

WarfareBAirport

and the normal line to pop them somewhere on the map....

myhangar = "Land_SS_hangar" createVehicle getMarkerPos "righthereplease"

If you want it to face a particular direction you can always add after that:

myhangar setDir X

X being the desired direction.


Planck
Title: Re: Adding a hangar without a editor upgrade
Post by: johnnyboy on 31 Oct 2008, 03:17:13
You can also use my replace_object script (attached).  With this you can put any place holder object in the editor--a barrel for example--and put it exactly where you want it, and set its azimuth.

You then put this line of code in it's init:

[this, "Land_SS_hangar", "myHangar"] exec "replace_object.sqs";

When the mission starts, this script creates the desired object (the hangar) at the position of the placeholder object, and set its direction to match the placeholder object.  Then the placeholder object is deleted.

Advantages of this approach are:

1.  You don't need a editor addon.
2.  You have an object in the editor that you can see and move around, and adjust azimuth, until you get it exactly where you want it.

Note:  The script basically does what Planck said.