Hi all, this is a serious noob question as I just started using AGS a month ago on my first point and click game.
I am trying to animate a drawer to open and close. I made the drawer sprites for closed, mid, open. I made a view for the animation. I got the drawer to be an object and successfully made an interaction where it will open, however when I go to click it closed it just runs the open animation again
. I followed the example from Julia Minamata's video https://youtu.be/S4mYv_Okzx0?si=_ovgfD94w9ZEbJFM&t=1952 Making The Crimson Diamond... LIVE! Adventure Game Studio Basics at 32:32.
I read the manual, searched the forums, and I just can't seem to get my drawer animation to close.. I am probably doing something exceptionally obvious and stupid but any help would be welcome. Thank you in advance.
Ok, the code:
-------------
oDrawer is my object
The View is 1. Loop is 0. Closed is frame 0, mid frame 1, open frame 2
cLux is my main character
-------------
function oDrawer_Interact()
{
cLux.Walk(140, 140, eBlock, eWalkableareas);
oDrawer.SetView(1);
if (oDrawer.Frame==0)
{
oDrawer.Animate(0, 15, eOnce, eBlock, eForwards);
}
else
oDrawer.Animate(0, 15, eOnce, eBlock, eBackwards);
}
I am trying to animate a drawer to open and close. I made the drawer sprites for closed, mid, open. I made a view for the animation. I got the drawer to be an object and successfully made an interaction where it will open, however when I go to click it closed it just runs the open animation again

I read the manual, searched the forums, and I just can't seem to get my drawer animation to close.. I am probably doing something exceptionally obvious and stupid but any help would be welcome. Thank you in advance.
Ok, the code:
-------------
oDrawer is my object
The View is 1. Loop is 0. Closed is frame 0, mid frame 1, open frame 2
cLux is my main character
-------------
function oDrawer_Interact()
{
cLux.Walk(140, 140, eBlock, eWalkableareas);
oDrawer.SetView(1);
if (oDrawer.Frame==0)
{
oDrawer.Animate(0, 15, eOnce, eBlock, eForwards);
}
else
oDrawer.Animate(0, 15, eOnce, eBlock, eBackwards);
}