Touch and Release

0 favourites
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Can I see a capx or snapshot

  • So here you can PRESS and hold, the colors will flip through, and on release, stops. Wondering if I can check for a certain frame. As it is now, everytime you hit that frame, 1 point is added ( not good lol)

  • No don't use the 'trigger once' cause it will only run 1 time and not any more after that. Drop the 'Trigger Once' on both. On the 2nd Event make the secondary condition if animation speed is great than 0. Also the 1st event can be 'On Touch Started' right now it will keep running every tick. Now for the third event if you want if they lift there finger on frame 2 then you would make if Animation=2 a subevent of 'Is Not Touching'

  • How about checking weather which frame on release. Any tips on how I can approach this? thx for taking the time PhoenixNightly

  • Just move the third event into the second one making it a subevent. So when the 'not touching' event run it will then see if it was on frame 2 when it happen.

  • worked like a charm. thanks. Guess I really dont know when I can use or combine subevents. awesome tho. thx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Trying to understand this more. I dont think this is quite a touch and release, but a workaround. Based on the image, should this not do the following.

    If when you've released the button, and it's not frame 2, destroy the blue image. right?.. but what it's doing is saying, if I am not touching it, destroy it. Unless I am not getting this right. Thoughts?

  • The 'Trigger Once' is stalking you remember that runs only one time an not anymore during the runtime of the layout until restarted. And for the Event on line 5 isn't working because you made it a subevent of line 4 Event so it won't trigger.

    1. "Trigger Once" do just that trigger one time and will NEVER EVER EVER EVER EVER run again until the program is restarted or layout restarted. This is usually used for setting things up or something that absolutely does not have to run again.

    2. Get better and knowing when something is a subevent of something else. So Line 4 Event 'If Sprite Animation Frame=2' has a sub-event of 'If Sprite Animation Frame not = 2' will never be true while it is a sub-event of 'if Sprite Animation Frame =2'. what you can just do is right click Sprite Animation = 2 and select the 'Else' Statement and destroy the sprite in there.

  • I think this is what you were wanting. The issue here is 1: unless the trigger 1 is there, when it's on frame 2, it just keeps adding 1 ( stops only when frame is not 2)

    2: after the (on start of layout stuff), the blue does not show ( destroyed)

    What ya think? What I'd like to do is. you press the btn, the colors change, stop on 2 , 1 point, stop on any other frame, fail.

    Hope I'm not being too much of a bug. thx.

  • About so the is not touching Sprite 2 doesn't run every tick you add a second condition to check if the animation speed is greater than 0. So this will only execute when both the conditions are true. The Else is red because you made it a subevent of what you want to be the alternative option to Sprite Animation Frame= 2. They are suppose to line up.

  • you can simply add another condition under it sayng else stop playng animation lol

    wtf is with guys giving so many wrong responses

  • PhoenixNightly

    From what I experienced, 'Trigger once' command doesn't need to wait until layout restarted again. I use it occasionally in various cases with same result as if it "fire 1x".

  • Ah OK my understanding with the manual explanation it would only fire the first time it becomes true.

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