? Touchscreen tx,ty reseting (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Touchscreen tx,ty reseting

  • #1 ✎ 19 thatguy Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Pokemon Is Awesome! I love Pokemon! Express Yourself How can I set tx and ty for example to 0. Because now everytime I start my program it starts out on the last touches spot before ending the program. Posted
  • #2 ✎ 136 ChaseCZ Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself I'm not sure what you exactly mean but this may help ACLS WHILE 1 DISPLAY 1 TOUCH OUT TX,TY,T LOCATE 0,1 ?TX LOCATE 0,2 ?TY WEND Posted
  • #3 ✎ 19 thatguy Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Pokemon Is Awesome! I love Pokemon! Express Yourself The problem is if I for example touch the bottom right corner and restart the game the coordinates stil are in the bottom right corner but thanks to your code you reminded me to place a if statement for when the touchscreen is not touched so thanks the problem is solved. Posted
  • #4 ✎ 7 Eversky_HD Minecraft Is Awesome! I love Minecraft! Express Yourself How can i make a touch button on the touchscreen? Posted
  • #5 ✎ 126 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies
    How can i make a touch button on the touchscreen?
    WHILE 1 TOUCH OUT T,X,Y IF T>0 THEN IF X>60 AND X<120 AND Y>60 AND Y<120 THEN GFILL 60,60,120,120 ENDIF ELSE GCLS GBOX 60,60,120,120 ENDIF WAIT WEND
    Posted
  • #6 ✎ 7 Eversky_HD Minecraft Is Awesome! I love Minecraft! Express Yourself thanks MZ952 Posted
  • #7 ✎ 7 Eversky_HD Minecraft Is Awesome! I love Minecraft! Express Yourself
    How can i make a touch button on the touchscreen?
    WHILE 1 TOUCH OUT T,X,Y IF T>0 THEN IF X>60 AND X<120 AND Y>60 AND Y<120 THEN GFILL 60,60,120,120 ENDIF ELSE GCLS GBOX 60,60,120,120 ENDIF WAIT WEND
    and how have you this numbers 60,120 ?
    Posted
  • #8 ✎ 136 ChaseCZ Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself
    How can i make a touch button on the touchscreen?
    WHILE 1 TOUCH OUT T,X,Y IF T>0 THEN IF X>60 AND X<120 AND Y>60 AND Y<120 THEN GFILL 60,60,120,120 ENDIF ELSE GCLS GBOX 60,60,120,120 ENDIF WAIT WEND
    and how have you this numbers 60,120 ?
    Try this and you'll see the coordinates ACLS XSCREEN 2 WHILE 1 DISPLAY 1 ?X LOCATE 0,1 ?Y TOUCH OUT T,X,Y IF T>0 THEN IF X>60 AND X<120 AND Y>60 AND Y<120 THEN GFILL 60,60,120,120 ENDIF ELSE GCLS GBOX 60,60,120,120 ENDIF WAIT WEND btw MZ952 just changed your code a lil' bit so he's able to see the coordinates
    Posted Edited by ChaseCZ
  • #9 ✎ 474 SquareFingers There is no way to change the TX and TY values of TOUCH OUT, other than touching the touchscreen. Posted