Author Topic: [Request] Server Bullet Time  (Read 1787 times)

it still needs testing, currently if released and you use it, it will change the timescale to A, use the correct time of B, then it will keep changing the timescale to 0.2 repeatedly lagging blockland, and after enough time, it gives a runtime error :D
isn't that so nice? at least i got rid of the syntax errors and stuff, i need to retest it again, i think i fixed it...
Code: [Select]
function timescales(%timescale1, %time1, %timescale2, %time2, %toggle)
{
if(%toggle = 0)
{
%toggle = 1;
commandtoserver('timescale', %timescale1);
%time = %time1 * 1000;
$timescalesched = schedule(%time, 0, timescales, %toggle);
}
else if(%toggle = 1)
{
%toggle = 0;
commandtoserver('timescale', %timescale2);
%time = %time2 * 1000;
$timescalesched = schedule(%time, 0, timescales, %toggle);
}
else
{
%toggle = 0;
}
if(%timescale1 < 0 || %time1 < 0 || %timescale2 < 0 || %time2 < 0)
{
cancel($timescaleshced);
}
}

Where is the loop?

Nvm, i see it..

bug is still there, haha
it's schedule(%time, 0, timescales, %toggle);
hmm, i think i just found out what's wrong...

bug is still there, haha
it's schedule(%time, 0, timescales, %toggle);
hmm, i think i just found out what's wrong...

Put cancel($timeScaleSched); at the top of the function, above if(%toggle = 0);

haha, if i use a negative number, that's when it freaks out
also, syntax, i just did that, although i don't think it should matter
edit: update
Code: [Select]
function timescales(%timescale1, %time1, %timescale2, %time2, %toggle)
{
if(%timescale1 < 0 || %time1 < 0 || %timescale2 < 0 || %time2 < 0)
{
cancel($timescaleshced);
}
if(%toggle = 0)
{
%toggle = 1;
commandtoserver('timescale', %timescale1);
%time = %time1 * 1000;
$timescalesched = schedule(%time, 0, timescales, %timescale1, %time1, %timescale2, %time2, %toggle);
}
else
{
if(%toggle = 1)
{
%toggle = 0;
commandtoserver('timescale', %timescale2);
%time = %time2 * 1000;
$timescalesched = schedule(%time, 0, timescales, %timescale1, %time1, %timescale2, %time2, %toggle);
}
else
}
%toggle = 0;
}
}
}
« Last Edit: September 06, 2010, 05:03:05 PM by phflack »

haha, if i use a negative number, that's when it freaks out
also, syntax, i just did that, although i don't think it should matter
edit: update
Code: [Select]
function timescales(%timescale1, %time1, %timescale2, %time2, %toggle)
{
if(%timescale1 < 0 || %time1 < 0 || %timescale2 < 0 || %time2 < 0)
{
cancel($timescaleshced);
}
if(%toggle = 0)
{
%toggle = 1;
commandtoserver('timescale', %timescale1);
%time = %time1 * 1000;
$timescalesched = schedule(%time, 0, timescales, %timescale1, %time1, %timescale2, %time2, %toggle);
}
else
{
if(%toggle = 1)
{
%toggle = 0;
commandtoserver('timescale', %timescale2);
%time = %time2 * 1000;
$timescalesched = schedule(%time, 0, timescales, %timescale1, %time1, %timescale2, %time2, %toggle);
}
else
}
%toggle = 0;
}
}
}

Does it work completely?

Does it work completely?
it has errors :D
when it's done, i'll post a media fire link to the .zip file

it has errors :D
when it's done, i'll post a media fire link to the .zip file

Ok, thank you.

If you finish it, could you PM me the link to the .zip? I won't be able to use a PC for the next couple of weeks and I don't want to lose the link before I even get it. Thanks.

i think i need to work out the bugs first :o
unless you want this version which doesn't work

7 page bump.

Are you still working on it phflack? I'm in no rush, just curious.

yes, i should get working on fixing it sometime, although i'm not sure what would be wrong

yes, i should get working on fixing it sometime, although i'm not sure what would be wrong

Ok. Thanks.