touch time

0 favourites
  • 4 posts
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind
  • Might someone help me I would like to create a special effect if a certain object is touched for 2 seconds I have looked at all the conditions for touch and have no idea how to do it

    Thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1) Create a global variable. Lets name it "TouchTime" (without the quotes)

    2) Create an event and add the "Is in touch" condition

    3) Create an action and choose "system", "Add to" and select the "TouchTime" variable.

    4) On the "Value" field, input "60 *dt" (without the quotes)

    5) Create an other event an add the "Compare variable" condition (under system).

    6) Set the comparison for the "TouchTime" variable to be grater or equal to 120.

    You are ready to create your action.

    You need to reset the "TouchTime" variable every time you lift your finger though. Create an other event:

    1) Put the "on any touch end" condition.

    2) As an action choose the "set value" (under system) and input "0" (without the quotes)

    Done!

  • Thanks mate it works like a charm iv been struggling with this, thank you so much much appreciated

  • You are welcome!

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