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.

Dark GDK / Sprite Animation Problem - please Help.

Author
Message
Comnik
15
Years of Service
User Offline
Joined: 16th Feb 2009
Location:
Posted: 17th Feb 2009 17:58
Hi,
first my Source Code:

The image contains 12 Sprites,
but if I run the Programm and hit the left Key to make my Men watch and walk left, the entire Animation is played.
Hope you understand my Problem.

Thanks.

Attachments

Login to view attachments
Gatorules
15
Years of Service
User Offline
Joined: 17th Dec 2008
Location:
Posted: 17th Feb 2009 18:22
the only obvious thing is that when you loaded the image it was number 1 but when you called to create an animated sprite you used image number 10
Comnik
15
Years of Service
User Offline
Joined: 16th Feb 2009
Location:
Posted: 17th Feb 2009 18:31
I think I solved it!!!
OK there is a Command called "dbSetSpriteFrame(SpriteNum, FramNum);"

So your (pseudo)code looks like this:

So first you have to Set the Current Frame.

I know I didn't explained it well...
Comnik
15
Years of Service
User Offline
Joined: 16th Feb 2009
Location:
Posted: 17th Feb 2009 18:54
@Gatorules:
That is not the Problem it works fine with it,
because Number 1 is for the Image,
and Number 10 for the Sprite Created with dbCreateAnimatedSprite.

But thanks alot, solved it myself.

Login to post a reply

Server time is: 2024-09-30 17:35:19
Your offset time is: 2024-09-30 17:35:19