I Want To Make My Button Work Once In X Hours

Discussion in 'How Can I...?' started by Zhubi, Mar 11, 2020.

  1. Zhubi

    Zhubi Boxer

    Joined:
    Mar 2, 2020
    Messages:
    16
    Likes Received:
    0
    Hi, I made a button on Game Over UI which gives you an amount of points after watching an AD, but I want to make it only work once in a hour for example. Anyone has an idea how to do that?

    upload_2020-3-11_22-1-17.png

    Thanks :) !
     
  2. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    Not sure why you would want to show it just once per hour. You can try using the timer logic piece and set it to your desired time. Test it of course with a very short time period.
     
  3. mshuraih

    mshuraih Boxer

    Joined:
    Feb 28, 2016
    Messages:
    81
    Likes Received:
    37
    u can add state machine and set a state to be active once after hour hour using timer node , but then the timer will be reset every time player exit the screen
     
  4. Zhubi

    Zhubi Boxer

    Joined:
    Mar 2, 2020
    Messages:
    16
    Likes Received:
    0
    upload_2020-3-12_0-39-35.png
    ehm.. Do you mind helping me? I really don't know how to do that
     
  5. mshuraih

    mshuraih Boxer

    Joined:
    Feb 28, 2016
    Messages:
    81
    Likes Received:
    37
    something like that where the timer will kick in event state 2 every 100 seconds - you add animation node to each state to signal that the button inactive / active ( state1/state2) but i really think that your timer will be reset every time the player exit the game that why one hour interval may be not practical you can make it every few minutes may be
     

    Attached Files:

Share This Page