[Solved]Archievement: 100 points in 10 seconds.

0 favourites
  • 10 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hello Guys!

    (sorry for my bad english)

    In my game will have some achievements for the player to collect. I've done almost all, I'm only stuck on this:

    - Make 100 or more points in 10 seconds.

    (10 seconds not in the begining of the game, but any time)

    I have a Global Variable called "GameScore" which has increased its value every time the player does something which should earn points (pretty obvious).

    But how can I do this "Archievement"?

    I think in every point earned, the system has to count points earned during the next 10 seconds and at the end it has to check if we can get 100 points or more. But that in every point! I can do 100 points in 10 seconds, then the system will do this check 100 times virtually the same time! Crazy, no?

    Does anyone have any suggestions on how to do this?

  • You can do this: Each time you earn a point you s... Hmm...Well, you must us... I dunno.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I have thought of one way of doing this ,but sure there are a few,more elegant ways...but it should work....

    create an invisible sprite call it "timer",give it a variable,lets say "count"

    set fade behavior to it..set fade in to 0,wait time to 10,fade out to 0

    set it to destroy after fade

    when you want to count your 10 seconds....

    create sprite "timer"

    Sprite "timer" is on created....set variable "count" to score

    sprite "Timer" is on screen

    score => sprite timer "count"+100.....achievement done!

    achievement = not achieved

    sprite timer on destroyed.....create object "timer"

    I have not tried this,but pretty sure it will work,and you could work it into your events easily.

    let me know how you get on with it.

  • You need a way to remember every score you added throughout time, an array seems like a good solution, although some heavy manipulation are required.

    I created a small example to help you.

    pixel perfick

    Your solution is clever, but unfortunately, you are only checking for achievement completion in 10 seconds blocks, not continuously.

  • Magistross it is continuous,as on destroyed it creates another....that's continuous!....

  • pixel perfick : Yes, but every 10 seconds you restart the "counter" to 0, that's what I meant by not continous ! Let's say you do 50 points in the last 5 seconds of your fading timer, then 50 other points in the first 5 seconds of the next timer, the achievement won't unlock !

  • I thought of the same as Pixel, but I understood that it is not what you want.

  • Magistross ....Apologies...you are correct...

  • pixel perfick : No need to apologize, we're all here to help each other ! <img src="smileys/smiley20.gif" border="0" align="middle" />

  • Thank you all for responding!

    A solution to pixel Perfick's system is create a sprite "timer" every time the "GameScore" variable changes, so if the integer variable of some sprite reach 100, archivement unlocked. But as he said, is not the most elegant way, especially for a mobile game, because it envolves alot of sprites and fade behaviors. But still a way!

    Thank you for this example. I think it's a great solution! I will work with it.

    If I get something simpler (will be difficult) I'll post here.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)