Disable Screen Touch For A Period Of Time

ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
edited November -1 in Working with GS (Mac)
Hi folks

In my latest app, I have a sequence where two buttons are on the screen. When one is pressed they both separate and after 10 seconds the return to their starting points.

I would like to temporarily disable the whole iphone screen from interaction for this 10 second period as the user can press the buttons while they are moving and it starts the sound effect again at any point they touch it...

Is there a way to disable the 'Touch' on the screen?

Thank you guys...

It takes a Zombie to know a Zombie!!!

Comments

  • magic101himagic101hi Member Posts: 713
    Well you can have a boolean where when you press the button it switches it to true then after 10 seconds it switches back to false then inside your button rules have it where if the boolean is false then it can run if it is true then it cannot run.

    Hope I helped
    -Josh
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hey ZombieBrains, I just sent you an email. :-)
  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    Hi Braydon

    I cannot get this to work.?

    I have created a new actor called 'Touch hinder' and placed it on the scene.

    In the actor i have added a timer that destroys the actor after 13 seconds...that works fine.

    I have added a boolean so that when either button is pressed, it changes the Touch Hinder attribute to TRUE, spawns the 'Touch Hinder' actor on the screen and it covers the whole screen but I can still touch the buttons underneath? After 13 seconds the actor is destroyed and the attribute Touch Hinder is changed back to FALSE.

    The actor is placed at the top layer within the scene but it doesn't stop me interacting with the buttons underneath it. I have set the colour to full green, so I get the green screen across the while IPhone screen but i can still interact with the objects below?

    Any ideas?

    It takes a Zombie to know a Zombie!!!

  • 0belisk0belisk PRO Posts: 189
    wouldnt this work?

    (Actor with touch behaviour)

    Rule
    When ALL of the following are true:

    Actor receives event - Touch - is Pressed
    Attribute - DisableTouch - is false

    then whatever you want it to do.

    then just create a invisible actor that controls when and why DisableTouch is made true, lust disabling the touch rules to work to your desire.
  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    I've finally managed to work it out...had a error in the actor in the scene where it spawns the actor. Works a treat now!

    Thanks guys for all your input... :)

    It takes a Zombie to know a Zombie!!!

Sign In or Register to comment.