Welcome to the Iron Front Fan Forums!
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
santiagojamesaea

Sergeant
Registered:
Posts: 106
Reply with quote  #1 
Hi all,
I'm trying to customise my troops and rather than add a backpack to an ammo crate i'd like to start off with in"on"or at least lying on the groud.This way i can "customise" the troops as far as uniforms go and start the missions off with them already armed and for example in no-mans land.
I have not been able to get a backpack"on"the unit in question,
the script i used was;
this addBackPackCargo "class name of backpack";

for the backpack on the ground;Ok,it's on the ground ready to be picked up but when i place this script in it's "init" line it doesn't become cleared.
clearWeaponCargo this;  or
clearWeaponCargo "name eg.z1"

Later,to add things i imagine that in the backpacks init line i would write e.g.

this addMagazine "lib_47Rnd_762x54";

or whatever it was that i wanted to add.

By the way,can anyone point me to a list of Grenades class names,i don't seem to be able to find them.Maybe it's because i'm not too familiar with their names but i don't seem to able to see them in the class names list..

Thanks all.
0
Tayuk

Avatar / Picture

Retired Admin/IFR
Registered:
Posts: 456
Reply with quote  #2 
Not tested any of this yet, so theres a job for you

[EDIT]
This works on singleplayer and mulitplayer on a hosted server, but not on a dedi, anyone know why?

Try this to add a backpack to your guys:-

this addBackpack "the backpack class name here";


To have the back pack emptied try adding this after the above line:-

clearMagazineCargo unitBackpack this;


The to add stuff to the backpack use this:- (This adds 10 M1 garand magazines to the backpack)

unitBackpack this addMagazineCargo ["LIB_8Rnd_762x63", 10];


If the unit already has a backpack, but its not big enough or you just want a different one, use this to remove his default one first

removeBackpack this;


So as an example, you place a US rifleman on the map in the editor, he has a standard US back pack with 6 slots. Put this lot in his init to remove his existing bag, give him a german sapper bag, empty the contents of the german bag and fill it with 10 MI garand mags.

removeBackpack this; this addBackpack "GerBag_sap"; clearMagazineCargo unitBackpack this; unitBackpack this addMagazineCargo ["LIB_8Rnd_762x63", 10];






0
santiagojamesaea

Sergeant
Registered:
Posts: 106
Reply with quote  #3 
ok,
i'm stupid.I had thos code snipetts but was unable to put them together to work.
0
Tayuk

Avatar / Picture

Retired Admin/IFR
Registered:
Posts: 456
Reply with quote  #4 
You used addbackpackcargo, thats to put a back pack in a vehicle or ammo box, to put one on a unit it has to be like ive shown.

Also all the granade class names are below (the class name is the blue text only)

LIB_US_Mk_2 - US Mark 2 granade
LIB_US_M18 - US Smoke granade white
LIB_US_M18_Red - US smoke granade red
LIB_US_M18_Yellow - US smoke granade yellow
LIB_US_M18_Green - US smoke granade green
lib_m39 - German M39 granade
lib_shg24 - German M24 stick granade
lib_shg24x7 - German high explosive stick granade
lib_nb39 - German smoke granade
lib_f1 - Russian F1 granade


 

0
Terry

Private
Registered:
Posts: 14
Reply with quote  #5 
What is the class name of bino's? Since few of the Allied non-comm's have these,would be good to add it to their packs.
0
santiagojamesaea

Sergeant
Registered:
Posts: 106
Reply with quote  #6 
hi there Terry,

LIB_Binocular_SU

Actually i believe this is the russian binocular but they're the same to me!!

If you go to the heading"mission editing and scripting" heading on the forum(this one) Tay uk has done a great title at the top called

Game Class List & Cargo Spaces

It doesn't have EVERYTHING but it does have the most useful things...e.g if you can't find Russian smoke grenades you can use American ones(dig the colours,or colors!).

Hope that helps.
0
Tayuk

Avatar / Picture

Retired Admin/IFR
Registered:
Posts: 456
Reply with quote  #7 
I am sure the class name "Binocular" works also.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.