Scripts / [SOLVED] Level Countdown

Author
Message
DannyD
6
Years of Service
User Offline
Joined: 30th Jun 2018
Location:
Posted: 23rd Aug 2019 12:43
Will it be possible to have a progress bar, which countdown eg: 3 minutes for the player to accomplish some tasks within the available time?, if time is over the level end?

I need this in an educational games, collection alphabet blocks, or anything else for that matter (in a specific time period)

I've done a basic 2d game in AGK , but would like to expand and change to a 3D Game using GG.
I know it will be possible with Lua, but my Lua knowledge and GG knowledge is limited... pretty new to GG.

Any help appreciated...
Thanks
Nothing is impossible,
Your mind is the Limit!!!
Cubemaps -> Skymaps GUI creator - Thread
Super Fast File Scanner - Thread

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

Go to answer
PM
DannyD
6
Years of Service
User Offline
Joined: 30th Jun 2018
Location:
Posted: 23rd Aug 2019 16:47
With my little Lua knowledge I got this going...
Will it be possible to addgraphics (like a progressbar) instead of text?



Nothing is impossible,
Your mind is the Limit!!!
Cubemaps -> Skymaps GUI creator - Thread
Super Fast File Scanner - Thread
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 23rd Aug 2019 17:13
Yes, using sprites.

Create a simple bar sprite and scale it in x or y appropriately.


Been there, done that, got all the T-Shirts!
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 23rd Aug 2019 18:26 Edited at: 23rd Aug 2019 18:27
is it supposed to reset if you leave the zone? if not you will want to remove or restructure so it doesn't check if you leave the zone while the timer is active

pretty sure this should work for adding a timer bar
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
DannyD
6
Years of Service
User Offline
Joined: 30th Jun 2018
Location:
Posted: 24th Aug 2019 13:00
Thanks guys

I got the progress bar working with this script


Secondly. You can collect "milk bottles" , that "increase the time ( secondsleft) with 5, if you hit them with this script


It kind off working..., but the progress and Prompt increase with 5 for a split second, and then back to the original count value

any advice please?








Nothing is impossible,
Your mind is the Limit!!!
Cubemaps -> Skymaps GUI creator - Thread
Super Fast File Scanner - Thread
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Aug 2019 14:01 Edited at: 24th Aug 2019 14:01
This post has been marked by the post author as the answer.
because you reset secondsleft in your main script
secondsleft=max-counter

you should add the time bonus to your maxTime

lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
DannyD
6
Years of Service
User Offline
Joined: 30th Jun 2018
Location:
Posted: 25th Aug 2019 02:20
Thank you @smallg, Really appreciate, sorted!!!
Nothing is impossible,
Your mind is the Limit!!!
Cubemaps -> Skymaps GUI creator - Thread
Super Fast File Scanner - Thread
PM

Login to post a reply

Server time is: 2024-12-22 09:15:28
Your offset time is: 2024-12-22 09:15:28