start actor timer when touched/pressed

how can i create a timer for an actor and the timer will start once the actor is pressed. I have successfully created the timer but it starts as soon as the app start. Can i get any help to start the timer on pressed?

Best Answers

Answers

  • evertevert Member Posts: 266
    edited December 2016

    make a rule when touch is pressed, drag your timer in there.

  • barbaraaaaaabarbaraaaaaa Member Posts: 11

    I've tried it but still it's not working. Do you have any other way to solve this? i'm sorry i'm still new to this

  • evertevert Member Posts: 266

    What does your timer do?
    If you make a rule when touch is pressed

    • timer
    • and your timer you need something
  • ToqueToque Member Posts: 1,188

    if you have a simple rule if touched and a timer is triggered it will work.

    But it may not give you the desired result. The timer will only work when pressed. So as soon as you lift finger it stops.

    What are you trying to achieve?

  • barbaraaaaaabarbaraaaaaa Member Posts: 11

    my timer goes
    every 1 second
    set game.timer to game.timer-1

    just that. i add it to the rule when touch

  • barbaraaaaaabarbaraaaaaa Member Posts: 11

    i tried to make a countdown timer. when the actor is pressed and timer start from 5 and end at 0.

  • barbaraaaaaabarbaraaaaaa Member Posts: 11

    So it works!! Thanks Evert and Toque. Btw, the timer counted only when i pressed right? i want it to continue counted to 0 when i released it. Do i need to add another attribute? Thanks in advance. i'm almost there :)

  • barbaraaaaaabarbaraaaaaa Member Posts: 11

    ok now it works. i just need to add rule when touch released and drag the timer. Thank you. You guys are really helpful o:)

  • evertevert Member Posts: 266

    Great! Good luck with your game!

  • ToqueToque Member Posts: 1,188

    Awesome!!!

    Remember when you ask a question be very specific. What you want to achieve?

    Good luck

Sign In or Register to comment.