Author Topic: Interval Command?  (Read 1961 times)

Thanks guys! Unfortunately your guys's Codes did not make a difference. BUT i did get this to code, to start working. I got the schedule to sorta work.
Code: [Select]
function IdleJet(%IJToggle)
{
if(%IJToggle == 1)
       {
Jet(1);
schedule(3000, 0, Jet, 1);
       }
else
       {
Jet(0);
schedule(1000, 0, Jet, 0);
       }
}
if (!$IdleJet)
{
   $remapDivision[$remapCount] = "IdleJetV1";
   $remapName[$remapCount] = "Toggle";
   $remapCmd[$remapCount] = "IdleJet";
   $remapCount++;
   $IdleJet=true;
}
But this wont loop?? HALP?


Still not working, at all. :[ Even if i do define the toggle. still doing the exact same thing,.

Clean up that dirty coding please

Code: [Select]
function IdleJet(%IJToggle)
{
echo("IjToggle == "@%ijToggle);
if(%IJToggle == 1)
{
Jet(1);
schedule(3000, 0, Jet, 1);
}
else
{
Jet(0);
schedule(1000, 0, Jet, 0);
}
}

if (!$IdleJet)
{
   $remapDivision[$remapCount] = "IdleJetV1";
   $remapName[$remapCount] = "Toggle";
   $remapCmd[$remapCount] = "IdleJet";
   $remapCount++;
   $IdleJet=true;
}

%ijtoggle is never defined, as headcrab said; also, try using echos (echos are your best friend) as i placed above, to see what is wrong instead of posting over and over.

Genius... It echoed ijtoggle == 1 then ijtoggle == 0 , didn't keep repeating itself.

You do know how schedule works right?

its schedule(time,this,function,args)

lets say time = 3 seconds

and schedule basically means, in 3 seconds, we will call this function with its arguments!

You do know how schedule works right?

its schedule(time,this,function,args)

lets say time = 3 seconds

and schedule basically means, in 3 seconds, we will call this function with its arguments!
What, exactly, is 'this'?
'schedule(time,this,function,args)'

It's the reference object. For example using the reference object:
schedule(100,%brick,"killBrick");
This calls %brick.killBrick(); in 100 milliseconds.

You do know how schedule works right?

its schedule(time,this,function,args)

lets say time = 3 seconds

and schedule basically means, in 3 seconds, we will call this function with its arguments!

Actually, I really don't., . . . I'm like a week old at this.