Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Sprite won't animated

Author
Message
Tigreboy
13
Years of Service
User Offline
Joined: 29th Nov 2010
Location: Italy
Posted: 4th Sep 2011 14:58
Hi everyone
I can't get my sprite to animated in this sequence ..

The image loaded contains a sprite sheet with 6 animation in vertical.
I only can see the first frame of the sprite but it can't get animated .. i have missed something ?

Attachments

Login to view attachments
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 4th Sep 2011 17:18
Without testing, I would suggest you move your PlaySprite command above the loop start, as each time you call it, it is restarting the animation at frame 1. You don't have to have the play command inside the DO loop, it runs by itself.

Tigreboy
13
Years of Service
User Offline
Joined: 29th Nov 2010
Location: Italy
Posted: 5th Sep 2011 16:28
Ohh that fool I am! I'm too used to DBPro where the play command need to be inside a loop to animate a sprite , I had forgotten that in AppGameKit the playsprite command is automatic!
Thank you a lot
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 5th Sep 2011 19:21
Doesn't DB do the same thing if you play a sprite in a loop? I didn't use the animated sprite commands in DB, so can't quite remember. You had to place you sprite in the loop, but play it from another routine, else it would constantly play frame 1. AppGameKit just negates the need of placement, unless you want it to move while in the loop.

Tigreboy
13
Years of Service
User Offline
Joined: 29th Nov 2010
Location: Italy
Posted: 6th Sep 2011 00:03
Not exactly DVader, now i remember that in AppGameKit the Playsprite command is automatic once written, so you have only to write a Sync command to show next frame, so this code

show the sprite animated, instead in DBPro you have to write this code

to animating the sprite.

Login to post a reply

Server time is: 2024-04-16 20:43:11
Your offset time is: 2024-04-16 20:43:11