Jump to content
Sign in to follow this  
dabel3

Save Gear in the external file script

Recommended Posts

Hi, I got a problem I want to make a box that will be empty and player will start mission with limited ammo and some basic weapon. He will then start scavenge for some more things and everything he want to be in next mission he will store in that box of his. I want to make the script that will save everything that is in this ammo box in some other external file (like cache.sqs) where i can use it to call this script to fill this box by items that were inside it at the end of each mission. Is any way to make this work? I saw many post about save gear script that saves items inside some box and then when player die will respawn with that gear but thats not exactly what I looking for. Any help would be great and I am not skillfull scripter I can understand thems but are really bad in know-how to do one :)

Share this post


Link to post
Share on other sites

Yes i need this too. So far what i was doing with my last unit, was that everione putted all his gear in his respective box, and then i manually checked and wrote down hte content, and then i manually added the content to the box in next mission.

It would be great if i had a script that would make me a custom ammobox.sqf wich i could use in the next mission instead of doing it all manually.

Share this post


Link to post
Share on other sites

Iam doing some research on it, so far i found this:

-http://www.armaholic.com/page.php?id=24757

-http://www.armaholic.com/page.php?id=21334

-http://forums.bistudio.com/showthread.php?167365-how-to-copy-to-clipboard-gear-being-used

I will play around with theese, and find out how to use them with Arma 2.

Edited by Mirek

Share this post


Link to post
Share on other sites

Thank you kind sir.

Share this post


Link to post
Share on other sites

Ok nothing of above works in arma 2. However i was triing to put random sets of coomands randomly and i accidentally figured it out.

So far tested only in singleplayer and only for ammoboxes not for players.

BUt here it is:

- put player

- Put ammobox name it "box_1" to its init field type:

clearWeaponCargoGlobal this; clearMagazineCargoGlobal this;

- Put trigger

- connect the trigger with player

- to the triggers init field put:

copyToClipboard str (getWeaponCargo box_1);

- hit previev

- go to the box

- put some gear to the box

- go to the trigger

- hit ALT+TAB

- open empty notepad file

- press ctrl+v

- you get the ammobox contents

with my first succesfull test i got:

[["ACE_Earplugs","ItemMap"],[1,1]]

Edited by Mirek

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  

×