hold to change scene?

Pennez-GamesPennez-Games Member Posts: 107
edited July 2012 in Working with GS (Mac)
hello i need help with this. i want to be able to hold down the icon for 2 seconds then the scene changes, but at the moment its as soon as you touch it the scene changes, i want to make it so you have to hold down that button for 2 seconds then the scene changes. please help this is realy what i need fixed! thanks!

Comments

  • PBEmpirePBEmpire Member Posts: 676
    on your button, add timer after 2 seconds, change scene to whatever you want. hope that helps!
  • Pennez-GamesPennez-Games Member Posts: 107
    on your button, add timer after 2 seconds, change scene to whatever you want. hope that helps!
    i tried but i want them to have to hold there finger down for 2 seconds before changing scene, the way you mentioned would make i so if you touched the button, and you let go ect.. the scene would change, :/
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    uncheck run to completion in the timer
  • Pennez-GamesPennez-Games Member Posts: 107
    uncheck run to completion in the timer
    its not checked though :(
  • Pennez-GamesPennez-Games Member Posts: 107
    uncheck run to completion in the timer

    my rule is

    timer: after 2 seconds,
    rule when mouse is down or touch is pressed
    change scene to next level.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    When touch is pressed
    .....change attribute self.pressedTime (real) to self.Time
    .....constrain attribute self.durationTime (real) to self.Time-self.pressedTime
    .....When self.durationTime > 2
    ..........Change Scene

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012

    @soundwaveninja

    You have the first two lines round the wrong way. For what you're after, it should be:

    Rule when mouse is down or touch is pressed
    timer: after 2 seconds
    change scene to next level.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • PBEmpirePBEmpire Member Posts: 676
    not sure if it works but let me try.
    create attribute call touch. then go to ur button and add rule- when touch is pressed inside, for every 1 second, change attribute touch to touch+1.
    when touch is pressed and attribute = 2, change scene.
  • Pennez-GamesPennez-Games Member Posts: 107
    i dont think you get what i meen,
    iv got a scrollable menu, thats why i want to have to hold it down to change scene, because you need to slide your finger to move the menu, but if you slide your finger and touch one of the icons it will change scene without wanting to, this is what i need fixed,
  • PBEmpirePBEmpire Member Posts: 676
    now u tell me lol. but it should still work because while scrolling and u hit the button, it will not change scene as the attribute is at 2. unless u hold your finger there for 2 sec.
  • Pennez-GamesPennez-Games Member Posts: 107
    now u tell me lol. but it should still work because while scrolling and u hit the button, it will not change scene as the attribute is at 2. unless u hold your finger there for 2 sec.
    your a genius it worked! thank you so much :D
  • Pennez-GamesPennez-Games Member Posts: 107
    now u tell me lol. but it should still work because while scrolling and u hit the button, it will not change scene as the attribute is at 2. unless u hold your finger there for 2 sec.
    hey would u be able to answer this for me please? http://forums.gamesalad.com/discussion/47178/proper-onscreen-controlls#latest
Sign In or Register to comment.