Jump to content

Recommended Posts

Hello all , 

I wanna simple compile my scripts to get more performance and i found this :

 

Init.sqf:

 

this= call compileFinal preprocessfilelinenumbers "Path/myscript"

 

Can i use this ?

Share this post


Link to post
Share on other sites

this what?

 

call compileFinal preprocessfilelinenumbers "Path/myscript";

Share this post


Link to post
Share on other sites
9 minutes ago, pierremgi said:

this what?

 

call compileFinal preprocessfilelinenumbers "Path/myscript"

I think i only must use 

call compileFinal preprocessfilelinenumbers "scripts/gf missions or whatever" right ? I found that in armaworld with this= at first an just copy paste

Share this post


Link to post
Share on other sites

if run once

0 = [] execVM "Path/myscript";

 

if multiple times (function):

 

myscript = compileFinal preprocessfilelinenumbers "Path/myscript";

0 = [] spawn myscript;
0 = [] spawn myscript;
0 = [] spawn myscript;
0 = [] spawn myscript;
. . . .

//or if this should return something

_return = [] call myscript;
_return = [] call myscript;
_return = [] call myscript;
_return = [] call myscript;
. . . . 

 

 

  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, davidoss said:

if run once


0 = [] execVM "Path/myscript";

 

if multiple times:

 


myscript = compileFinal preprocessfilelinenumbers "Path/myscript";

0 = [] call myscript ;

 

Allright like this ? 

Test = compileFinal preprocessfilelinenumbers "script/lootspawn.sqf";

0 = [] call Test ;

 

And wen i would compile more then 

 

Allright like this ? 

Test = compileFinal preprocessfilelinenumbers "script/lootspawn.sqf";

0 = [] call Test ;

 

Test2 = compileFinal preprocessfilelinenumbers "script/whatever";

0 = [] call Test2 ;

Share this post


Link to post
Share on other sites

Depending on your script and where/when you want to run it. For a loot spawning, with some "heavy" commands and conditions, I'd rather spawn it.

 

test = compileFinal preprocessfilelinenumbers "script/lootspawn.sqf";

[] spawn test;

 

Note: execVM is similar to compile preprocessfile "script/lootspawn.sqf";

See the differences?

Share this post


Link to post
Share on other sites
10 minutes ago, pierremgi said:

Depending on your script and where/when you want to run it. For a loot spawning, with some "heavy" commands and conditions, I'd rather spawn it.

 

test = compileFinal preprocessfilelinenumbers "script/lootspawn.sqf";

[] spawn test;

 

Note: execVM is similar to compile preprocessfile "script/lootspawn.sqf";

See the differences?

Differences ; i have read that it's better to compile when u use many scripts and it impact the CPU not so much like execvm 

Share this post


Link to post
Share on other sites
Just now, WaffenFetisch said:

Differences ; i have read that it's better to compile when u use many scripts and it impact the CPU not so much like execvm 

Yes, if you need to run it more than once.

Share this post


Link to post
Share on other sites
14 minutes ago, pierremgi said:

Yes, if you need to run it more than once.

Oh okey also like a Trigger spawn over a sqf or something 

Share this post


Link to post
Share on other sites
40 minutes ago, WaffenFetisch said:

And a lootspawner run only 1 times ? I mean it haves many loop processes and and and

 

Well, if you don't know how "your" script works, who can say that without Krystal ball?

That depends on what you script:

- a unique script spawning all loots at once (beurk), or along with conditions for player(s) approaching buildings...

- a repetitive script, running each time a player enters a trigger's area or gaining some reward...

 

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

×