Jump to content
Sign in to follow this  
mr_lahey

How to add chem lights to unit inventory in editor?

Recommended Posts

So, I am extremely new to the editor (just started today) and I want to create a playable unit with chemlights (and maybe other grenades) in his inventory. I want to create a little mission where you can only see by chemlight (just sounds fun to me) but I cannot figure out how to add them to inventory, or a weapon box.

Share this post


Link to post
Share on other sites

in A2 , you can add Weapons with

this addWeapon "WeaponClassName";

Magazine

this addMagazine "MagazineClassName";

and Items:

this addItem "ItemClassName";

dont know wicht category the chemlights in Arma3 will belong too , but i think it's Item class.

Chemlight Class Name: Chemlight_blue

Chemlight Class Name: Chemlight_green

Chemlight Class Name: Chemlight_red

Chemlight Class Name: Chemlight_yellow

Try one of the Code Snippets frome above and put it in the Initialisation line of your player unit.

I dont test it , but it should work.

You can find the Classnames of Weapons and Items here:

http://browser.six-projects.net/cfg_magazines/classlist?version=67

and here:

http://forums.bistudio.com/showthread.php?147694-ArmA3-Classnames-no-discussions

Share this post


Link to post
Share on other sites

So I tried adding "this addItem "chemlight_blue";" to the players' init commands, but it didn't seem to work. Hmmm.

Share this post


Link to post
Share on other sites
So I tried adding "this addItem "chemlight_blue";" to the players' init commands, but it didn't seem to work. Hmmm.

i will figuere it out later today ..... i have to go to the damn work now ;-/

i dont know .. but maybe you have to add it to the Vest of the soldier ?!

its just a idead :)

Try this

Give your soldier a name .. something like unit1

then add this to the init line of your unit.

unit1 addItem "chemlight_blue";

if it not work , maybe someone else have an idead ... or you have to wait until i am back from work today ;)

Share this post


Link to post
Share on other sites
i will figuere it out later today ..... i have to go to the damn work now ;-/

i dont know .. but maybe you have to add it to the Vest of the soldier ?!

its just a idead :)

Try this

Give your soldier a name .. something like unit1

then add this to the init line of your unit.

unit1 addItem "chemlight_blue";

if it not work , maybe someone else have an idead ... or you have to wait until i am back from work today ;)

I tried renaming my char and setting it to that, but also did not work. I guess I'll wait until someone else has an idea or you get home from work haha.

Share this post


Link to post
Share on other sites

Try [ this addItem "Chemlight_blue"; ] or [ this addMagazine "Chemlight_blue"; ] or [ this addWeapon "Chemlight_blue"; ]

without the brackets :)

Share this post


Link to post
Share on other sites

Chemlights seem to be treated as grenades in game so I guess you could try adding the same way you would a grenade, think this is addMagazine but not 100% sure.

Edit: Using

this AddMagazine "chemlight_blue";

works

Edited by HapShrap

Share this post


Link to post
Share on other sites
Try [ this addItem "Chemlight_blue"; ] or [ this addMagazine "Chemlight_blue"; ] or [ this addWeapon "Chemlight_blue"; ]

without the brackets :)

I have not tried it with mag or weapon commands, so I'll try that here in a bit. Using it under "additem" definitely didn't work though.

Share this post


Link to post
Share on other sites
Chemlights seem to be treated as grenades in game so I guess you could try adding the same way you would a grenade, think this is addMagazine but not 100% sure.

Edit: Using

this AddMagazine "chemlight_blue";

works

havent tryed this but makes sense.

---------- Post added at 16:27 ---------- Previous post was at 16:26 ----------

Sorry for double post but its important:

this addMagazine "Chemlight_blue";

Works.

Share this post


Link to post
Share on other sites
I have not tried it with mag or weapon commands, so I'll try that here in a bit. Using it under "additem" definitely didn't work though.

ok i figuered it out ....

this AddMagazine "chemlight_blue";

works fine !

1.: Create a Soldier

2.: Put this line in the Initialisation

this AddMagazine "chemlight_blue";

If you dont have any Chemlights in your Inventory , look at your backpack or vest ...

Maybe you dont have any space left ?!

Chemlight Classnames:

Chemlight_blue 	
Chemlight_green 	
Chemlight_red 	
Chemlight_yellow

greetings :)

German Tutorial: Arma 3 Editing Blog

Edited by Anemia

Share this post


Link to post
Share on other sites
Chemlights seem to be treated as grenades in game so I guess you could try adding the same way you would a grenade, think this is addMagazine but not 100% sure.

Edit: Using

this AddMagazine "chemlight_blue";

works

Hooray! That's the one. :) Worked for me and thank you so much!! Now, off to make this silly night ops mission.

:edit: Holy crap the new lighting system is amazing. Setting it to a night with no moon (this next week) and adding chemlights made a MASSIVE difference. This is exactly what I wanted. Thank you all for the help :)

Edited by mr_lahey

Share this post


Link to post
Share on other sites

How can you place it into a chest, with 10 of each chemlights?

Edited by Daniboo

Share this post


Link to post
Share on other sites
How can you place it into a chest, with 10 of each chemlights?

I am not sure! I have not tried any chests yet. Maybe someone else has?

Share this post


Link to post
Share on other sites

How would one attach a chemlight to a divers back and back pack?

Share this post


Link to post
Share on other sites

doesnt seem to work...the code puts it into your inventory (i think in your vest) just fine...but I cant figure out how to move the chemlight out of the vest and into a usable slot...when i try to drag it it wont drop into a slot and therefore it cant be used...can anyone confirm this?

Share this post


Link to post
Share on other sites
How to use the chemlight ? thanks guys

Once you get the chemlight spawned in to your inventory, load in a game and press SHIFT+G and it will cycle your throwables (grenades, chemlights and smoke grenades)

Share this post


Link to post
Share on other sites

when i do shift+G that open my inventory , i dont understand how to put on the chemlight , i can only throw the chemlight but not light up . sorry for my bad english

Share this post


Link to post
Share on other sites
when i do shift+G that open my inventory , i dont understand how to put on the chemlight , i can only throw the chemlight but not light up . sorry for my bad english

My mistake, it may be CTRL+G then. It's one or the other, I know that for sure. I use it to cycle my chem lights when I play around int he editor

Share this post


Link to post
Share on other sites

that change the cycle but i can just throw the chemlight but the light is off

how to turn on the light ?

Edited by kakarot

Share this post


Link to post
Share on other sites

This is the old way of doing it:

lgt = "Chemlight_red" createVehicle [0,0,0];
lgt attachTo [player, [-0.07,-0.05,0], "LeftShoulder"];

It would be nice to detect if a chemlight is selected with Ctrl-G, then use that condition to show an addAction and attach it to the player.

Share this post


Link to post
Share on other sites

@Mattar_Tharkari, Thanks for that if I may further ask how would I remove the attach to when exiting the water?

Share this post


Link to post
Share on other sites

If you want to do it automatically add this at the end of the script that attaches the light:

waitUntil {!(surfaceIsWater (getPosATL _unit))};
detach _chemlgt;
deleteVehicle _chemlgt;

Share this post


Link to post
Share on other sites
This is the old way of doing it:

lgt = "Chemlight_red" createVehicle [0,0,0];
lgt attachTo [player, [-0.07,-0.05,0], "LeftShoulder"];

It would be nice to detect if a chemlight is selected with Ctrl-G, then use that condition to show an addAction and attach it to the player.

Your prayers have been (almost) answered.....just working on the next bit to check if player is holding a chemlight.

http://forums.bistudio.com/showthread.php?154318-Chemlight-on-Soldier-Multiplayer

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  

×