Taurus 20 Posted July 29, 2007 "bopp.sqf" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_c = "camera" camCreate [(getPos player select 0),(getPos player select 1),(getPos player select 2)+20]; _c cameraEffect ["external","back"]; _c camSetTarget someGuy; _c camSetFov 0.7; _c camCommit 0; sleep 60; started by nil = [] execVM "bopp.sqf"; It laggs/stutters and makes me sick. Same goes for following an aircraft like "boppEnhanced.sqf"; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = airCraft; _c = "camera" camCreate getPos _unit; _c cameraEffect ["external","back"]; _c camSetTarget _unit; _c camSetFov 0.7; _c camCommit 0; while{(getDammage _unit) < 0.6} do{ _c camSetRelPos [0, -20,11.5]; _c camCommit 0; sleep 0.00001; }; Removing the sleep doesn't do the trick either. This script is too exec:d by execVM. And as the previous one it makes me sick, even sicker when watching, because of the lagg/stuttering Please advice. Share this post Link to post Share on other sites
Balschoiw 0 Posted July 29, 2007 Have you already tried preloading the camera ? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_camera camPrepareTarget someGuy; _camera camPreparePos [(getPos player select 0),(getPos player select 1),(getPos player select 2)+20] _camera camPrepareFOV 0.700 _camera camPreload 15 Share this post Link to post Share on other sites
Taurus 20 Posted July 29, 2007 Thanks for the answer. Nope I didn't. But I've tried it and it didn't solve my problem Still stutters/laggs. May it be that I'm using .sqf and not .sqs which is said to be "faster" than .sqf? Share this post Link to post Share on other sites
Kirby 2 Posted July 29, 2007 Maybe your PC is a lil slow. Maybe someone else try it out and see if it stutters on their PC. Share this post Link to post Share on other sites
Taurus 20 Posted July 29, 2007 buts my computar r teh monstr!! Maybe it isn't. AMD Athlon 64 3500+ 2.21 GHz 2 GB RAM GeForce 7950 GT Anyways, its the thing I posted last here: http://www.flashpoint1985.com/cgi-bin....t=62971 Feel free to try it out. Thanks in advance Share this post Link to post Share on other sites
Balschoiw 0 Posted July 30, 2007 Without looking at your file, have you already tried to call the scripts the "regular" way by using exec only ? execVM runs asynchron to engine timer, maybe that´s why. Share this post Link to post Share on other sites
Taurus 20 Posted July 30, 2007 Eh, that broke my script. its got waitUntils and sleep in there and that wasn't liked at all when using exec instead of execVM. I'll try with a good old spawn. [edit] Nah, didn't work either. Still stuttering like when I'm running the game in x4 time compression. [edit2] Think I got hold of the problem Doing <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">waitUntil{ _c camSetRelPos [0, -20,11.5]; _c camCommit 0; ((getDammage _unit) > 0.6) }; Instead of <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">while{(getDammage _unit) < 0.6} do{ _c camSetRelPos [0, -20,11.5]; _c camCommit 0; }; Worked more smoothly Apparently waitUntil is "faster" than while. you learn something new each day. Its unfortunate that if(someThing) exitWith{} doesn't seem to work whilst in a waitUntil tho Share this post Link to post Share on other sites