SRL Archive - Reflection Help

getanimation crashes SMART


blackfire553

2011-06-09 14:44:52

This script crashes every time SMART is open:
program GetAnimation;
{$DEFINE SMART}
{$i SRL/SRL.scar}
{$i Reflection\Reflection.Simba}
begin
repeat
While (CharacterAnimating or CharacterMoving) do
begin
Writeln(inttostr(getanimation));
end;
wait(1000);
until(false);
end.

i luffs yeww

2011-06-09 15:00:14

You never call SetupSRL or SetupReflection.

blackfire553

2011-06-09 15:13:01

Thanks for a speedy response :duh: good to know how stupid i am so i can get back to scripting :spongebob:

i luffs yeww

2011-06-09 15:23:41


{$DEFINE SMART}
{$i SRL/SRL.scar}
{$i Reflection\Reflection.Simba}

var
last_anim: Integer;

begin
SMART_Server := 64;
SMART_Members := True;
SMART_Signed := True;
SMART_SuperDetail := False;
SetupSRL;
SetupReflection;
repeat
while (CharacterAnimating) do
if(GetAnimation > 0)then
begin
if(GetAnimation <> last_anim)then
Writeln(GetAnimation);
last_anim := GetAnimation;
end;
until(False);
end.

Slightly less annoying one. This won't output -1 (shouldn't) from walking. It gave me -1 a few times, which was lame, and I didn't really mess around with it to see if I could fix it (what I think is happening is just too many calls to GetAnimation and it returns -1 for it sometimes. Only called it so much to make sure it was really the current animation. You could change it and do something like anim := GetAnimation; at the start of the while loop, so that no matter what that animation will be used, but it may not work from time to time (lag, iono)).

Thinking of how to associate the animation and event that caused it without slowing anything down, but I don't really care to look into it. Ask if you need anything else. :)

x[Warrior]x3500

2011-06-09 17:59:25

hey luffs, just wondering: do we have to call SetupReflection now? setupsrl wont suffice?

Awkwardsaw

2011-06-09 18:40:47

From: x[Warrior]x3500
hey luffs, just wondering: do we have to call SetupReflection now? setupsrl wont suffice?


only if you want reflection :p

x[Warrior]x3500

2011-06-09 20:35:29

From: Awkwardsaw
only if you want reflection :p


lol im such a noob at reflection… i prolly should start putting it in there :/

color ftw ;)

i luffs yeww

2011-06-10 01:26:30

Yeah, I like color as well. However, ref2 is looking quite nice. To be frank, I think color should get a rework as well to have a little more valid competition for the color vs reflection debate. ;)