Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Freydall on Sun 05/03/2006 11:14:31

Title: Animated Inventory Items
Post by: Freydall on Sun 05/03/2006 11:14:31
A short simple question... it's easy to animate cursors but what if you want an animated item cursor, like a creature that blinks or an electronic device with flashing lights? Quite sure there's nothing about this in the manual, and if there is then my apologies.
Title: Re: Animated Inventory Items
Post by: Ashen on Sun 05/03/2006 11:19:43
Unless it's been added in the new betas, there's no way to animate Inventory items without scripting it. However, strazer wrote this handy module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22888.0) a while back, which should take care of that for you.
Title: Re: Animated Inventory Items
Post by: Freydall on Sun 05/03/2006 12:06:58
I put " InvItemAnimation.Start(iMGLVE, 7, 0, 10, eRepeat); " in the global script under repeatedly execute, and it says "unexpexted: InvItemAnimation"... What else do I need to put?
Title: Re: Animated Inventory Items
Post by: Ashen on Sun 05/03/2006 12:18:04
When you say "under repeatedly execute", you haven't placed it outside of the function, have you? Off hand, that's the only thing I can think of that would give that error. "Unexpected (commandname)" errors are usually when a function is called from a part of the script it shouldn't be.

Also, you should only need to call that command once (unless you want to change the animation, of course), so game_start might be a better place than rep_ex.
Title: Re: Animated Inventory Items
Post by: Freydall on Sun 05/03/2006 12:21:05
I've now put... :

#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
  // called when the game starts, before the first room is loaded
}

InvItemAnimation.Start(iMGLVE, 7, 0, 10, eRepeat);

#sectionend game_start  // DO NOT EDIT OR REMOVE THIS LINE

...but it still comes up with the unexpected error.


Oops, that was clumsy. Yep, just noticed that I put it outside the {}. Cheers! Thanks for the help...