プレイ日記
Quote QuoteGamer
-I need help- When you touch in a certain area, then want it to do something, it repeats itself. I understand that you have to touch somewhere else to kill the operation, but how do I completely stop the TOUCH function? HELP APPRICIATED MUCH!!
1そうだね
プレイ済み
返信[1]
親投稿
raimondz raimondzz
TOUCH function return the time that the screen is pressed. Put a condition that only check if the stylus is on a rectangle when TT==1. TOUCH OUT ->TT<-,TX,TY
0そうだね
プレイ済み
返信[2]
親投稿
Darkcon SGMXZYDarkcon354
here is a img of code so you better understand what he talking about note i didn't link it to a zone. you can do that in this test prg i made...
0そうだね
プレイ済み
返信[3]
親投稿
Quote QuoteGamer
I'm sorry, I'm still not getting it. Just, how do I get kill the TOUCH function?
1そうだね
プレイ済み
返信[4]
親投稿
*J.P.* DEV NEWPICY3
simply put: you have your touch out, then three variables which are usually TT,TX,TY but in some cases are different because it honestly dosent matter. take the first one TT and at the ent of your touch code IF TX>40 AND TX<80 THEN IF TY>40 AND TY<80 THEN TT=1 (stuff) ENDIF ENDIF or something near to that i think. (might be a bit off as i am doing this from memory)
0そうだね
プレイ済み
返信[5]
親投稿
Darkcon SGMXZYDarkcon354
when you use the touch command in the syntax touch (sttm, ty,tx) now sttm is a counter so when i say tchtime=sttm time touch is held down get stored in tchtime
0そうだね
プレイ済み
返信[6]
親投稿
Darkcon SGMXZYDarkcon354
so when touch screen is touched with styles sttm start to count now until you let off screen
0そうだね
プレイ済み
返信[7]
親投稿
Darkcon SGMXZYDarkcon354
so when i say if sttm and tchtime<=1 then i'm saying sttm is true and tchtime equals 1 or less so it fire the action one time even if i keep stylus press dwn. you can finish the code by adding code to the rectangle area to touch like a button you make for lowwer screen.
0そうだね
プレイ済み
返信[8]
親投稿
Darkcon SGMXZYDarkcon354
or just do what raimondz said basically the same thing both has a lot control over firing the action you make!
0そうだね
プレイ済み
返信[9]
親投稿
Darkcon SGMXZYDarkcon354
just type all the code i made to help you so your better understand how touch work in smilebasic little different from petitcomuter i'd noticed...
0そうだね
プレイ済み
返信[10]
親投稿
Chickens32 Chickens32
TOUCH OUT TM,TX,TY TM is if you're touching the screen or not Yes=True No=False
1そうだね
プレイ済み