Jump to content
Sign in to follow this  
maxjoiner

scripts after saving

Recommended Posts

Hi, I've a problem.

In My mission after the save when I reloaded the saving my custom scripts don't work!

Ex: Init unit: nul = [this] execVM "light.sqf";

or: trigger: nul = [player] execVM "light.sqf";

and also the scripts in init.sqf don't work!

Somebody can help me!

Share this post


Link to post
Share on other sites

I've never actually thought of this before. Would making JIP friendly make this work?

Share this post


Link to post
Share on other sites

This should solve your problem:

Put that custom resource in your description.ext:

class RscTitles
{
   class saveload
   {
       name = "Save/Load";
       duration = 10e10;
       fadein = 0;
       idd = -1;
       movingEnable = false;
       onload = "uinamespace setvariable ['str_saveload',_this select 0];";
       class controls    {};
   };
};

Make a script called "saveload_manager.sqf";

[color="Red"]//saveload_manager.sqf
while {alive player} do {
880224 cutrsc ["saveload","plain"];
waituntil {isnull (uinamespace getvariable "str_saveload")};[/color]

[color="RoyalBlue"]        nul = execVM "myscript.sqf";
       nul = execVM "myscript.sqf";[/color]
[color="Red"]}[/color]

(The red part is important, replace the blue part with your own script !)

Call it in your init.sqf:

nul = execVM "saveload_manager.sqf";

Edited by Wiggum

Share this post


Link to post
Share on other sites

Thank You very much! :yay:

I Try immediately! :bounce3:

---------- Post added at 08:50 AM ---------- Previous post was at 08:26 AM ----------

It works ! :yay::yay::yay:

You are a Genius! :pc:

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  

×