プレイ日記
NagatoYuki newtonyic1
i'm trying to make my displayed text stsnd still and when i press button a then i go to the next loop
9そうだね
プレイ済み
返信[1]
親投稿
OlOOlOOl pi_r_round
Once in the loop you're not checking the current state of the button, only the state you saved in the variable. Change the code to have it check the current state inside the loop.
0そうだね
プレイ済み
返信[2]
親投稿
NagatoYuki newtonyic1
how?i don't get it
0そうだね
プレイ済み
返信[3]
親投稿
OlOOlOOl pi_r_round
Also, get rid of that END statement that's just above the WEND. The END statement will force the program to exit before the WEND sets the instruction pointer back up to the WHILE statement.
0そうだね
プレイ済み
返信[4]
親投稿
NagatoYuki newtonyic1
how do i change it to check the state?
0そうだね
プレイ済み
返信[5]
親投稿
OlOOlOOl pi_r_round
Checking BUTTON checks the current state. Checking B checks the state it was at, at the moment you set B=BUTTON. Have a look at this screenshot. It's a simple way to wait until button A is pressed. Notice we first wait until no buttons are pressed. This prevents a previous continued press of A from making this code flow through without waiting for a new press of A.
1そうだね
プレイ済み
返信[6]
親投稿
NagatoYuki newtonyic1
i used the second one for waiting until 'a' button is pressed.what it does is quickly displays the text but it also quickly changes to the next display. it doesn't make the text stand still
0そうだね
プレイ済み
返信[7]
親投稿
OlOOlOOl pi_r_round
Try using both. Wait for button not being pressed, then wait for button to be pressed.
0そうだね
プレイ済み
返信[8]
親投稿
NagatoYuki newtonyic1
it didn't work
0そうだね
プレイ済み
返信[9]
親投稿
OlOOlOOl pi_r_round
Can you upload your program and provide the key so I can have a look?
0そうだね
プレイ済み
返信[10]
親投稿
NagatoYuki newtonyic1
i finished the game.it's rock paper and scissors. i added the wait command instead for it. i'll get it to show you were it happened
0そうだね
プレイ済み
返信[11]
親投稿
NagatoYuki newtonyic1
it's the highlighted game. it starts from line 116 to the last line.that's where i wanted to hold the text until i press the a button.instead of wait
0そうだね
プレイ済み
返信[12]
親投稿
OlOOlOOl pi_r_round
Ok. I'm not entirely sure how you wanted it to work, but I've altered two button-checking areas and it seems to work ok for me. It's the program "RPS" in the screenshot. p.s. I renamed your @labels so I could better understand the branching.
0そうだね
プレイ済み
返信[13]
親投稿
OlOOlOOl pi_r_round
I noticed the rock/paper/scissors selection was a bit erratic, so made these changes.
0そうだね
プレイ済み
返信[14]
親投稿
OlOOlOOl pi_r_round
Here's the code that waits for the player to press the A button before moving onto the next round.
0そうだね
プレイ済み
返信[15]
親投稿
NagatoYuki newtonyic1
i did this with your code and it seems to work ok. i have to see if it goes wrong again when you play it over and over
0そうだね
プレイ済み