トピック
受付中
kidfife kidfife2

need help with stuff

need help?
1そうだね
プレイ済み
返信[1]
親投稿
kidfife kidfife2
i need help on detecting the touch command on a sprite without useing another sprite HELPPPP
0そうだね
プレイ済み
返信[2]
親投稿
*J.P.* DEV NEWPICY3
making what i call a touch button is simple, so you have your TOUCH OUT TX,TY then you make a box, so set the start of the box x,y then the end. here ill show you. IF TX>50 AND TX<100 THEN IF TY>50 AND TY<100 THEN BEEP 5 ENDIF ENDIF so if you are in the area 50-100 x,y then you are touching it and it should beep. hopefully you understand.
0そうだね
プレイ済み
返信[3]
親投稿
Hanzo rzsense
Could you try running the following program? ACLS:XSCREEN 2,256,2 DISPLAY 1 SPSET 0,0:SPCOL 0 WHILE TRUE SPOFS 0,RND(304),RND(224),0 WHILE TRUE VSYNC 1,TOUCH OUT TT,TX,TY IF SPHITRC(TX,TY,1,1)>=0 && TX==1 THEN BEEP 5:BREAK ENDIF WEND WEND
0そうだね
未プレイ
返信[4]
親投稿
Hanzo rzsense
I'm sorry! TX==1 on line 8 is wrong. Please replace it with TT==1.
0そうだね
未プレイ
返信[5]
親投稿
*J.P.* DEV NEWPICY3
just wondering, what does BREAK do..?
0そうだね
プレイ済み
返信[6]
親投稿
Hanzo rzsense
BREAK is for exiting from a loop (FOR - NEXT, WHILE - WEND and REPEAT - UNTIL ).
0そうだね
未プレイ
返信[7]
親投稿
*J.P.* DEV NEWPICY3
hmm.. thats cool i never knew that.. thanks.
0そうだね
プレイ済み
返信[8]
親投稿
kidfife kidfife2
ok thx
0そうだね
プレイ済み