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 / CurrentFrame

Author
Message
Behdadsoft
16
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 30th Jun 2015 18:55 Edited at: 30th Jun 2015 18:58
Hi.

I want check when current frame is 5 then do action. I have a sprite sheet with 5 frame. now when I use GetSpriteCurrentFrame() for check custom frame number, don't work it and only work when use :



even I used
but don't change anything.

when I use separated images like below then use GetSpriteCurrentFrame(), it work very well. while I have Sprite sheet and need use it instead of separated images.



please guide me.

Thanks.
Markus
Valued Member
21
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Jun 2015 19:32
the current frame u get when the animation play or after u use SetSpriteFrame .
maybe u look for GetSpriteFrameCount ?

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Behdadsoft
16
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 30th Jun 2015 19:47
Quote: "he current frame u get when the animation play"


yes i try get current frame when animation is playing.

Quote: "maybe u look for GetSpriteFrameCount ?"


no, already i used this command but don't work.mean this command count current playing animation.
Markus
Valued Member
21
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Jun 2015 21:37 Edited at: 30th Jun 2015 21:39
did you v2? me using only v2.
i can make a test if you upload your sprite sheet.

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Behdadsoft
16
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 30th Jun 2015 22:34
Quote: "did you v2? me using only v2."


I used V1 and test it on V2 demo (download in steam), but don't work.
Behdadsoft
16
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 30th Jun 2015 23:30 Edited at: 30th Jun 2015 23:40
I find the problem.

thanks Markus.
Markus
Valued Member
21
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 1st Jul 2015 00:48
me nosy, what was the problem?

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Behdadsoft
16
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 1st Jul 2015 05:14 Edited at: 1st Jul 2015 06:34
When i changed animation from idle to attack, then changed the state from 0 to 1 and forget change two things:

1- forgot check if state=1 then do action.

2- i used select...case for change animation, so i check current animation frame in it,while i should check it out of select...case.
Markus
Valued Member
21
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 1st Jul 2015 09:27
ah ok

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)

Login to post a reply

Server time is: 2025-05-31 18:19:26
Your offset time is: 2025-05-31 18:19:26