Jump to content
Sign in to follow this  
MrPing1000

Two noob questions

Recommended Posts

Total novice to mission editing, two questions.

1. How on earth do I put individual weapons into a map? Can't seem to find them under units.

2. Is it possible to put objects inside buildings or even look inside the floors of buildings from the editor? For example theres a golden AKS at the power plant, yet I've extracted the map to have a look and I cannot see the weapon at all.

Share this post


Link to post
Share on other sites

1. You can place them with a script or the init line of a unit in a box.

Write this to the Init Line of a weapon box:

this addweaponcargo ["AKS_Gold",10];
this addmagazinecargo ["30Rnd_762x39_AK47",10];

This will add a 10 Golden AKs and 10 AK Mags to a box or a vehicle.

If you want to give the player a weapon, you must write something like this to the init line of the players unit:

removeallweapons this;
this addweapon "AKS_Gold";
this addmagazine "30Rnd_762x39_AK4";

Now the player (or ai soldier) starts with just an golden ak and one mag.

2. You cant see into buildings from the editor. Objects placed "over" an building, will be on the roof, but you can manually adjust their hight with the init line of the object.

this setpos [(getpos this select 0),(getpos this select 1),10];

The unit with this text in its init line will be placed 10 meter over the ground (just modifie the last value (10))... this will be the something like the the 3. floor in a building... its not easy to place an object correct at the first try, place... preview... adjust and so on.

If you want to place weapons on the floor, you need somethink called weaponholder. Its like an invisible ammobox... everytime in game you drop a weapon on the floor, a weaponholder will be created.

But you can place a weaponholder via script or init line of another object... here is the clue:

Place a invisible heli H and write this to the init line:

myownholder = "weaponholder" createvehicle getpos this;
myownholder addweaponcargo ["AKS_Gold",1];
myownholder addmagazinecargo ["30Rnd_762x39_AK47",10];

The first line creates a weaponholder at the helihs prosition. Its name ist stored in "myownholder". You can modifie this name for each weaponholder you want to place (maybe "holderfürgoldenakonhospitalroof" ^^).

In the second and third line your holder gets an Golden AK and 10 Mags... you can change the weaponholders position by changing the position of the helih BEFORE the "createvehicle" command. If you want the holder to be 8 meters over ground, the init line if the helih may be look like this:

this setpos [(getpos this select 0),(getpos this select 1),10];
myownholder = "weaponholder" createvehicle getpos this;
myownholder addweaponcargo ["AKS_Gold",1];
myownholder addmagazinecargo ["30Rnd_762x39_AK47",10];

Thats it^^

Edit: You can find a list of all weapons and magzines here:

http://www.g-g-c.de/forum/showthread.php?t=10251

Edited by NeoArmageddon

Share this post


Link to post
Share on other sites

It gives a AKS_Gold in ArmA2? Will try out.... :eek:

Share this post


Link to post
Share on other sites

2. You cant see into buildings from the editor. Objects placed "over" an building, will be on the roof, but you can manually adjust their hight with the init line of the object.

this setpos [(getpos this select 0),(getpos this select 1),10];

The unit with this text in its init line will be placed 10 meter over the ground (just modifie the last value (10))... this will be the something like the the 3. floor in a building... its not easy to place an object correct at the first try, place... preview... adjust and so on.

Now that is an explanation, thank you!

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  

×