Jump to content
Sign in to follow this  
Azza FHI

how to run intro.sqf on dedicated server

Recommended Posts

hi, I need some help running the intro.sqf on MP. will need to do both a dedi and normal MP version. the only way I have gotten the intro to work (and it seems to work well) is by putting 'this exec "intro.sqf" in the init line of a unit in game but I know there are better ways to do it. can someone explain why the way I have done it is not a good way? will the server run 1 intro for each client and result in lag?

I have tried putting this in the init.sqf but it doesn't work

if (isDedicated) then {

execVM "intro.sqf"

};

have been testing on dedicated machine.

what exactly do I need to do? step by step plz as im still new to scripting.

thanks

Share this post


Link to post
Share on other sites

depends on what "intro.sqf" does

if it has.... (_tower = "Land_Cargo_Tower_V2_F" createVehicle (getpos player))

then it might be bad

if it has ....Hint "Helllo world"

then it's good

Share this post


Link to post
Share on other sites

ahk, well I doesn't spawn anything. its just some music and camera work. the only thing I want to add to it is parameters to turn it on or off in mish params. so ill just leave as is? why have I read that all sqf need to be run with execVM and not just exec or is that not true? thanks

playMusic "track1";

titleText ["\n\n","BLACK FADED",0];

sleep 5;

TitleRsc ["Image1", "BLACK FADED", 0];

~9

titleCut [" ","BLACK FADED",2]

~1

titleCut ["","BLACK IN",1]

_camera = "camera" camcreate [0,0,0]

_camera cameraeffect ["internal", "back"]

showcinemaborder True;

;comment "22:43:09";

_camera camSetTarget Unit1;

_camera camSetRelPos [2,1,0.2];

_camera camPrepareFOV 0.700;

_camera camCommitPrepared 0

~10

titleCut [" ","BLACK OUT",1]

~1

titleCut [" ","BLACK FADED",1]

~1

titleCut ["","BLACK IN",1]

;comment "22:43:09";

_camera camPrepareTarget [104008.66,57589.68,28414.04];

_camera camPreparePos [19083.86,13061.79,0.20];

_camera camPrepareFOV 0.700;

_camera camCommitPrepared 0

~10

titleCut [" ","BLACK OUT",1]

~1

titleCut [" ","BLACK FADED",1]

~1

titleCut ["","BLACK IN",1]

;comment "22:46:03";

_camera camPrepareTarget [61178.65,104033.73,31.59];

_camera camPreparePos [19155.30,13292.14,1.18];

_camera camPrepareFOV 0.700;

_camera camCommitPrepared 0

~10

titleCut [" ","BLACK OUT",1]

~1

titleCut [" ","BLACK FADED",1]

~1

titleCut ["","BLACK IN",1]

;comment "22:52:38";

_camera camPrepareTarget [95599.33,73727.13,12634.72];

_camera camPreparePos [14729.35,16273.66,1.68];

_camera camPrepareFOV 0.700;

_camera camCommitPrepared 0

~12

titleCut [" ","BLACK OUT",1]

~1

titleCut [" ","BLACK FADED",1]

~1

titleCut ["","BLACK IN",1]

_camera camSetTarget dBoat;

_camera camSetRelPos [15,70,3];

_camera camCommit 0;

~10

_camera camSetTarget dBoat2;

_camera camSetRelPos [5,70,0.7];

_camera camCommit 5;

~14

titleCut [" ","BLACK OUT",1]

~1

titleCut [" ","BLACK FADED",3]

~1

titleCut ["","BLACK IN",1]

player cameraEffect ["terminate","back"]

camDestroy _camera

exit

Share this post


Link to post
Share on other sites

exec is for *.sqs don't bother with this

execVM is for *.sqf

you can also run *.sqf with "call" and "spawn"

and your code would have no effect on a dedicated server, it's all visual, theirs no player on a dedicated server to see/hear it.

i can't remember but is ~ == sleep

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  

×