Results 1 to 4 of 4

Thread: Very Simple Reflection Help

  1. #1
    Join Date
    May 2008
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Very Simple Reflection Help

    i was told that to find out if i was animating all i had to do was this:

    SCAR Code:
    if(IsAnimating)then
    Result:= True;

    So i made a very simple script to see if i could actually use this, if i got an error, i couldnt, if i didnt, i could.

    and i got an error:

    Code:
    Unknown identifier 'IsAnimating' in script
    Here is the script:

    SCAR Code:
    program AnimateTest;
    {.include SRL\SRL.scar}
    {.Include SRL/SRL/Reflection/Reflection.Scar}
    Function AmIAnimating:Boolean;
    Begin
      if(IsAnimating)then
      Result:= True;
    end;
    Begin
      ClearDebug;
      ActivateClient;
      SetupSRL;
      If AmIAnimating then
         Writeln('im animating w00t');
      else
         Writeln('im not animating');
    End.

    So, my question is, am i doing something wrong [most likely an include] or is it just not a function?

    ALSO, what include file could i find 'GetAnimation' in, as i would like to see what that is.

  2. #2
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Program AnimateTest;
      {.include SRL\SRL.scar}
      {.Include SRL/SRL/Reflection/Reflection.Scar}

    Begin
      ClearDebug;
      ActivateClient;
      SetupSRL;
      SetupReflection;
      If CharacterAnimating Then Writeln('im animating w00t');
      Else Writeln('im not animating');
    End.

    Its CharacterAnimating. It checks to see if you are animating. Same as CharacterMoving, checks to see if you are moving.

    If you are looking to check for a particular animation then you need to do the following:

    SCAR Code:
    Function IsWhatever: Boolean;
     Var
      Me: tme;
    Begin
      Me := GetMe;
      Result := (Me.Animation = 867);
    End;

    That will see if you have an animation ID of 867. Thats the id of chopping tree with a certain axe, cant remember which one.

    If you require any help with reflection feel free to PM me / MSN me

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  3. #3
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use:
    SCAR Code:
    if CharacterAnimating then
    . .

    Edit: Rogeruk - ninja'd.

  4. #4
    Join Date
    May 2008
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks guys. Ty ty ty

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
  •