Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Tue 25/05/2021 03:53:47

Title: Button Frame stopped at
Post by: Slasher on Tue 25/05/2021 03:53:47
Hi,

Can someone remind me... Stop button animating to show frame of animation stopped at (between 0 and 9)... Then I can check Frame...

Thanks
Title: Re: Button Frame stopped at
Post by: eri0o on Tue 25/05/2021 05:05:10
Going by the button animate page on the manual (https://adventuregamestudio.github.io/ags-manual/Button.html#buttonanimate), it should be something like this I think:
Code (ags) Select
// trigger the animation to play in repeat somewhere
btn.Animate(6 /*view*/, 2/*loop*/, 4/*delay*/, eRepeat);


//in the button click event
int frame = btn.Frame;
btn.NormalGraphic = btn.Graphic;