We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

How to make a counter and a timer ?

Home Forums Puzzles How to make a counter and a timer ?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #34967
    AvatarMaha
    Newbie

    Hi , is there any tutorial for understanding how to make a counter and a timer for a game with puzzles?

    #35011
    Yuri KovelenovYuri Kovelenov
    Developer

    you can check out the sources of our game demo Farmer’s journey.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #35591
    AvatarMaha
    Newbie

    it’s complicated to me , i cant understand which part should i look at …. i want to make a counter to something like the physics template where there is balls hit another objects & bowling pins ,i want to gain points only when the ball hits the bowling pins.

    #35592
    GlifTekGlifTek
    Licensee

    Hey maha,
    You might get some use out of this example in the user manual for making a counter.

    You can use the change variable by x puzzle.

    :good:

    #35598
    AvatarMaha
    Newbie

    Thank u for your help @GlifTek but i still don’t understand how to do it, all i have done is to put it as a text and i still cant make it count the score or make the timer work, can u help me ?

    Attachments:
    You must be logged in to view attached files.
    #35658
    AvatarMaha
    Newbie

    Anyone can help ?

    #35705
    GlifTekGlifTek
    Licensee

    Try unchecking “in parent doc”.
    You’re adding the divs to the container, which is where the verge 3d element is.
    Pretty sure this may be the issue. :good:

    #35822
    AvatarMaha
    Newbie

    Thank u @GlifTek :) , it worked fine with the timer , but i still cant make the score count. :-(
    (in the physics template example) that what i did, can u tell me whats wrong plz?

    Attachments:
    You must be logged in to view attached files.
    #35868

    There’s a time value that changed on 1 each seconds inside Every 1 second puzzle. This is very simple timer, if you want to start count again just set 0 to the value and it will be counted from the beginning again.

    Co-founder and lead graphics specialist at Soft8Soft.

    #35874
    AvatarMaha
    Newbie

    Thank u @pigeon but im making it as a count town timer :D what im asking here is the score i cant make it work :(

    #35880
    GlifTekGlifTek
    Licensee

    Hi maha,
    I can’t think of anything that might be causing the issue except that maybe the asynchronous puzzles setup you have might be parsing the collision puzzle BEFORE the clonedBall var is set, so the collision puzzle might not function of there’s not a “clonedBall” var to act on.
    (Check your browser dev tools’ console messages for issues liked this too!)

    To help with this, (if it’s the problem), I like to make things structured a-synchronously where things are parsed in order.

    I make a “MAIN PROCEDURES” procedure with its execution puzzle (right click the procedure to make it) be the ONLY one that is executed… Where all the other procedures that need to occur in order, have their executable puzzles WITHIN that “MAIN PROCEDURES” actual container puzzle, STARTING with an “initialization” procedure execute puzzle, from which it’s container holder that holds all your variables to be SET/CREATED etc.

    I’m on mobile now so can’t show you an example, but I might be able to find a post where I explained this with images before.

    Hope you understand what I’m saying.
    :good:

    • This reply was modified 6 days, 5 hours ago by GlifTekGlifTek.
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.