Results 1 to 2 of 2

Thread: Run Energy

  1. #1
    Join Date
    Jan 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Run Energy

    So, the Run Energy function is
    RunEnergy(Min: Integer): Boolean

    Would there be anyway to change Min to Max?
    Assuming Min stands for Minimum
    Last edited by darrenhwang; 03-02-2012 at 09:40 PM.

  2. #2
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    You would just alter the code like so:

    Simba Code:
    function RunEnergy(Max: Integer): Boolean;
    var
      T, R: Integer;
      s: String;
    begin
      T := GetSystemTime + 5000;
      repeat
        R := GetMMLevels('run', s);
        Result := (R >= Max);
        if (Result) then
        begin
          SetRun(True);
          Exit;
        end;
        if (R > 0) then
          Exit;
      until (T > GetSystemTime);
    end;

    Or something like that, it depends on exactly what you want it to do. I don't see how having your player run if it is ABOVE a certain number helps you out.
    Last edited by Nebula; 03-03-2012 at 04:26 AM. Reason: spelling error

Thread Information

Users Browsing this Thread

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

Posting Permissions

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