Jump to content
Sign in to follow this  
Melmarkian

Using savestatus/loadstatus

Recommended Posts

Hi,

ok so I have a problem with saving of chars in a campaign. I tried this:

At the last trigger (with "END1"), I execute a script called "ende.sqf" with

unitname savestatus "unitname1";

In the init.sqf of the next mission I use:

unitname loadstatus "unitname1";

And then again at the end of the mission:

unitname savestatus "unitname2" (Because I read somewhere you always have to give a new name)

But my men always start with the standard loadout of their soldier class. I experimented a bit and to my surprise, they carried over their wounds in the next mission? This is what really confuses me.

Could there be a problem with units of the same name used in the intro of the mission? I also tried to open the objects.sav to see whats saved, but I haven´t had any luck with opening the file.

---------- Post added at 06:26 PM ---------- Previous post was at 05:09 PM ----------

Ok, tested two more things:

Different name for units in intro and mission => no effect.

Executed the script with a hint before the mission ends => no effect.

I tried to load the status saved in mission 1 in the 3rd mission. => isn´t working either (backpack goes missing, too)

tested with .sqs => no effect

tested with player instead of charname => no effect

Different names of units between the mission are not a problem, either. (worked between 1 & 2)

The status save works from my first to the second mission. But not afterwards.

I actually use a sqs file in the first mission, but that cannot make a difference?

The wounding i reported earlier was also between 1 and 2 mission. One more thing: When I load the third mission the playerchar resets to standard loadout but also loses his backpack!

I am confused...

Edit3:

I even made an testcampaign now and it works without problems...

But not in the other one!

Edited by Melmarkian

Share this post


Link to post
Share on other sites

Lol, ok I finally made it. I rebuild the complete system and it works now. But don´t ask me what I did wrong.

So if someone wants to do it and is stuck like me:

http://www.mediafire.com/?uen71qbi7n6o4jv

This is a testcampaign with 3 missions where you can see how the savestatus/loadstatus is done.

PBO and Files included.

What is also discoverd in the process is the exit.sqf. Everything you write in there will be executed at the end of the mission. Seems to be a good place for weaponpool and status modifications.

Another discovery (maybe just for me):

To read the objects.sav file you can use the unRap Tool by Kegetys. It will convert the file into an .cpp which is readable

Edited by Melmarkian
  • Like 1

Share this post


Link to post
Share on other sites

Thanks for your work, so i use fleepee save status campaign "rainy fall", go check inside maybe it can help too.

//////////////////////////////////////////////////////////////////

// Function file for Armed Assault

// Created by: FleePee

//////////////////////////////////////////////////////////////////

if (local server) then {

{

if (_x hasWeapon "ItemGPS") then {weapon_pool = weapon_pool + ["ItemGPS"]};

removeAllItems _x;

_weps = weapons _x;

_mags = magazines _x;

{weapon_pool = weapon_pool + [_x]} foreach _weps;

{ammo_pool = ammo_pool + [_x]} foreach _mags;

} foreach units igor_team;

{caisse addweaponCargo [_x,1]} foreach weapon_pool;

{caisse addMagazineCargo [_x,1]} foreach ammo_pool;

caisse savestatus "ammo_crate";

{heli addweaponCargo [_x,1]} foreach weapon_pool;

{heli addMagazineCargo [_x,1]} foreach ammo_pool;

heli savestatus "truck_crate";

weaponpool_done=true;

};

dudesave = dude saveStatus "dude1";

if (true) exitwith {};

Edited by Dalia

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  

×