SRL Archive - OSR Help

Using the Animating Command


Mezzanine

2012-06-18 17:53:13

I ran across the Animating command earlier today and it looks like it would solve a few problems in my script when it misclicks by chance. I'm just not sure how to set up the box to be looking at the character model. What I tried to do was this:
var
x, y: integer;
box: TBox;
begin
box:= ([MSCX-15, MSCY+40], [MSCX+15, MSCY-40]);

 repeat
Wait(1000);
until(Animating(box, 5000, 2000)

And when I do I get this error:Closing parenthesis expected at line 91(the line the box:= is on). I think I'm getting it because I'm just defining the box incorrectly, but I'm not entirely sure.
Any help would be greatly appreciated

Thanks,
Mezz

Abu

2012-06-18 17:56:50

Define it like this:
box := IntToBox(MSCX-15, MSCY+40, MSCX+15, MSCY-40); 

IntToBox converts those co-ordinates into a box, which is essentially what you want to do.

Kyle Undefined

2012-06-18 17:58:26

box := IntToBox(1, 2, 3, 4);

;)

EDIT: :ninja:'d

Left the tab open for too long.

Mezzanine

2012-06-19 01:20:15

Thanks for the help :) I love both of your tutorials, they've helped me a lot
Thanks again,
Mezz