OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: The-Architect on 08 Jan 2009, 18:46:38
-
How can I stop the player being able speed up time during a script?
-
Perhaps there's a better way, but you could simply run a loop checking if accTime != 1 and if so setting it to 1
while {scriptOn} do
{
if (accTime != 1) then
{
setAccTime 1;
};
sleep 0.5;
};
-
Sorry to be a pain but how would I do this in a .sqs?
-
I suck at SQS, but this seems to work :D
#loop
? accTime != 1 : setAccTime 1;
~0.5
? scriptOn : goto "loop"
-
Arch, just curious but why would you want to implement this with SQS? SQF (functions) perform much better than SQS when executing something at rapid intervals. So your mission would have better performance running this script as an SQF than and SQS.
Im sure for most the difference would be negligible, but it might not be transparent to some.
Just my 2 cents worth.
-
I've not learned all the syntax for .sqf. At least with .sqs I kind of know where I am.
You know how it is, when you're flying through a particular point with a project you don't want to stop and learn a whole new thing. If there's an easy way you'll take it.
-
The path of least resistance :)
-
Unfortunately, the path of least resistance all too often ends abruptly in a 400ft waterfall with big pointy rocks below. If ArmAII goes .sqf-only, your .sqs barrel will not survive the drop.
It's really not that much more to learn (http://www.ofpec.com/ed_depot/index.php?action=details&id=390&game=ArmA) at all.
-
He's right, I spent 3 days to learn SQF syntax, it's worth your time. The control structures allow you to make a good code and not that "spaghetti code" shit you have to do with goto's in SQS. Besides as he said, ArmA2 will be propbably SQF only
-
I agree also, mostly the main differences are just the looping functions all other commands really remain the same.