プレイ日記
Caesar Caesar267
Hi, everyone! I'm still working on this program that uses button controls. I decided to make it into a game where you have to catch the fish 5 times. I've gotten to the point where if you get the fish 5 times, you win. I want to put some text in the bottom right corner that tells you how many fishes you've caught using the GPUTCHR command. But, it doesn't show up. Can someone please help me?
5そうだね
プレイ済み
返信[1]
親投稿
Cris cmart592
Do you have sprite collision set up? If so then put: FC(fish caught)=0 IF (variable of SPHITSP)==(control number of fish) then FC=FC+1:CLS LOCATE (x and y coords of bottom right screen):PRINT FC IF FC==5 THEN GOTO @WIN Simple as that.... If you know sprite collision... If you don't, then I suggest you set it up.
0そうだね
プレイ済み
返信[2]
親投稿
mystman12 mystman12
I think the reason it's not showing up is because GPUTCHR puts text onto the graphics screen, and the BG tiles are covering it. Try using GPRIO to change the Z coordinate of the graphics screen so it is above the BG layer.
0そうだね
プレイ済み
返信[3]
親投稿
Cris cmart592
Oh yea put it in a label, FC should be at the beginning of your program so it doesn't get set to 0 every time, have your main loop gosub to it and then put return at the very end of the gosub loop: ACLS *Variables here with other loading and initializing stuff* @MAIN *code and stuff* GOSUB @CHKFC *more code stuffs* GOTO @MAIN @CHKFC *insert code here* RETURN
0そうだね
プレイ済み
返信[4]
親投稿
Cris cmart592
Oh yea one last and final thing. In the print FC section do the locate first then PRINT Fish caught: ". Then do PRINT FC.
0そうだね
プレイ済み
返信[5]
親投稿
Caesar Caesar267
Thanks both of you! My current set up is I(for fish caught)=I. And then when the sphitsp command was fulfilled I had I=I+1. Thanks for all the suggestions!
0そうだね
プレイ済み
返信[6]
親投稿
Cris cmart592
Your welcome, yay!
0そうだね
プレイ済み