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.

Newcomers AppGameKit Corner / [SOLVED] dec sprite progress-bar

Author
Message
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 9th Jul 2020 00:58
So I have a sprite set as a progress-bar that decreases over time. I have it set to resize with a time indicator.

But is is way to fast and I dont know how to dec the amount at a slow rate for a timer.

Here is my code

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Jul 2020 01:50 Edited at: 9th Jul 2020 01:51
This post has been marked by the post author as the answer.
When you SetSpriteSize(). Those are the values that will be returned the next time you call GetSpriteWidth/Height()
Maybe try GetSpriteWidth/Height at the beginning of your code and not in the loop
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 9th Jul 2020 06:04
Okay, thanks, I'll try that tomorrow and let you know.
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 9th Jul 2020 12:36 Edited at: 9th Jul 2020 12:40


Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 9th Jul 2020 18:58
blink0k

You was correct, it works now, and works well, Thanks

Qugurun

Nice code, Ill check it out

Login to post a reply

Server time is: 2024-03-29 14:48:13
Your offset time is: 2024-03-29 14:48:13