Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Mon 13/05/2013 20:39:57

Title: Button refuses to animate
Post by: Slasher on Mon 13/05/2013 20:39:57
Hi

i'm at the point of breaking.

Is there a max number of gui controls where a button ceases to function?

There is a view 15 with a loop 0 that works perfectly.
Code (AGS) Select

Button72.Animate(15, 0, 9, eRepeat);


Somehow it refuses to animate.

The Button is Button72(id 0)

This is something I'v successfully done 100's of times before.

EDIT: Iv'e just spotted 2 buttons with id 0.......


Title: Re: Button refuses to animate
Post by: Crimson Wizard on Mon 13/05/2013 21:07:35
There's a limit to 15 buttons animated simultaneously. How many buttons do you animate?
Strangely, I cannot find this information in the manual... is there? Hmm...


Quote from: slasher on Mon 13/05/2013 20:39:57
EDIT: Iv'e just spotted 2 buttons with id 0.......
Gui controls are numbered relative to gui (meaning - every gui has control ids start with 0). Are those buttons on same gui or on different?
Title: Re: Button refuses to animate
Post by: Slasher on Mon 13/05/2013 21:33:25
Hi Crimson

there is only 1 button animating and 1 button that mimics the players movements on screen (mini radar) on a GUI.

So, both buttons are on GUI.

I have tried using different views but the button remains static. It has worked before so maybe i cocked it up somewhere along the line.

I deleted some old Views so some are missing and new Views are numbered 1,2 etc etc

Still puzzled.

EDIT: I've noticed it forwards 1 frame and then stops!

Button72.Animate(15, 0, 5, eRepeat);


Title: Re: Button refuses to animate
Post by: Ryan Timothy B on Mon 13/05/2013 21:51:55
Where is this located in your script? Animation calls don't like to be called in repeatedly_execute (or _always).
Title: Re: Button refuses to animate
Post by: Slasher on Mon 13/05/2013 21:57:33
Hi Ryan

QuoteAnimation calls don't like to be called in repeatedly_execute (or _always).
I was doing a dry run and did not realise this...

It will actually be called when an inv item is used on player.

Use inventory on player: GUI becomes visible: Button (Radar) animates etc etc...

I took it out of rep exe always and put it in a room load and its working..

Well, at the moment ;)

cheers




Title: Re: Button refuses to animate
Post by: Crimson Wizard on Mon 13/05/2013 22:05:27
Quote from: slasher on Mon 13/05/2013 21:57:33
I took it out of rep exe always and put it in a room load and its working..

Well, this means you started the animation over and over again, so it never went further first or second frame. (Just commenting)