Results 1 to 5 of 5

Thread: How do i set a timer on a script?

  1. #1
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default How do i set a timer on a script?

    i was just wondering how i could set a timer on a script so that it terminates after a specified amount of time?

  2. #2
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I believe they work something to this effect:

    SCAR Code:
    program New;
    {.include srl/srl.scar}

    Procedure Wait2;
    var
     VariableHere : Integer;
    Begin
    MarkTime(VariableHere);
    Repeat
    Wait(1000)
    WriteLn('Waited!')
    Until(TimeFromMark(VariableHere) = 1000)
    End;

    begin
    Wait2;
    end.

  3. #3
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    ya but that doesn't terminate it.... but i think i can figure out how to from that thnx!

  4. #4
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Then put a

    SCAR Code:
    If(TimeFromMark(VariableHere) >= 1000) Then
    Begin
    WriteLn('Ending script!');
    TerminateScript;
    End;

  5. #5
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    ok thnx!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Count Down Timer Script
    By mal1t1a in forum First Scripts
    Replies: 5
    Last Post: 09-19-2007, 11:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •