Archiverse Internet Archive
投稿のみ 投稿と返信
前のページ(最近)
1 2 3 4 5 6 7 8 9 10 11 1214
次のページ(過去)
返信[54]
親投稿
OlOOlOOl pi_r_round
At the end of each @LABEL block and before the next @LABEL you need some code that'll direct the user to somewhere else. Otherwise they'll fall out of one @LABEL block and into the next. (It's like reading a choose-your-own adventure book through page by page instead of following the instructions.)
0そうだね
プレイ済み
返信[53]
親投稿
OlOOlOOl pi_r_round
Think back to the choose-your-own-adventure books. Each @LABEL represents the heading at the top of each chapter. The chapter contains some information about what's happening now. These are your ?"print statements". Then you're given some action options. These are the INPUT"what to do",A statements. Then you're told "If you run away, turn to chapter 73". These are IF A==... GOTO
0そうだね
プレイ済み
返信[4]
親投稿
OlOOlOOl pi_r_round
This screenshot shows code to move a sprite using the circlepad, if that interests you.
0そうだね
プレイ済み
返信[3]
親投稿
OlOOlOOl pi_r_round
This screenshot shows code to move a sprite using the X Y A B buttons. Change "AND" in the button() test statements to "==" if you don't want to allow diagonal movement.
0そうだね
プレイ済み
返信[47]
親投稿
OlOOlOOl pi_r_round
After the print statement's closing quotes. IF A==4 THEN ?"You follow the white rabbit": GOTO @ForestClearing IF A==5 THEN ... ... @ForestClearing ?"You arrive in a forest clearing. A small white rabbit is here. Select 1 to offer a carrot, 2 to play your harp, or 3 to try to catch it with your net." ...
0そうだね
プレイ済み
返信[45]
親投稿
OlOOlOOl pi_r_round
I don't really know... I've never tried.
0そうだね
プレイ済み
返信[43]
親投稿
OlOOlOOl pi_r_round
Except for line 35, it looks like it should be ok. I don't know what your idea is for the storyline, but I'm guessing it's going to branch out, based on each of the three actions, so you might want to add some GOTO statements.
0そうだね
プレイ済み
返信[41]
親投稿
OlOOlOOl pi_r_round
The lines after 35 look like they'll work fine. Line 35 itself needs a few minor changes. At the start instead of ? (print), since it's asking for input it should be INPUT (INPUT will print the message in the quotes.) Then at the end of the quotes, the variable name should match that which you've used in the IF ... THEN lines after it, so instead of RE$ the variable should be A
1そうだね
プレイ済み
返信[38]
親投稿
OlOOlOOl pi_r_round
Sorry, on reviewing my earlier posts I noticed mistakes. Lines where we're checking the value of a numeric variable, like this one here: IF A=="1" THEN... should not have quotes around the numbers. They should actually be like this one below. IF A==1 THEN... We need quotes only if we're using string variables, like this. IF A$=="KOALA" THEN...
0そうだね
プレイ済み
返信[37]
親投稿
OlOOlOOl pi_r_round
Any text you want to appear on the screen as is, has to be in quotes. If it's not in quotes, letters & words are interpreted as variables and their value (typically zero) will appear.
0そうだね
プレイ済み
返信[34]
親投稿
OlOOlOOl pi_r_round
The lines that print out the options would go below the "your options are" line. What happens when the user selects an option would go after that option's IF ... THEN, or at the label pointed to by the IF ... THEN. However, this may lead to a very large program. Maybe a better idea would be to map out all the data for each room and write generic functions to present the data and control the flow.
0そうだね
プレイ済み
返信[32]
親投稿
OlOOlOOl pi_r_round
It could be something like this. REPEAT ?"Your options are..." ... INPUT "Do which action number?",A IF A=="1" THEN GOTO @EXPLORE IF A=="2" THEN GOTO @REST IF A=="3" THEN GOTO @EAT UNTIL 1 Any non-zero number after the UNTIL forces it to always go back up to the REPEAT. You could achieve the same thing by replacing "REPEAT" with "@label" and "UNTIL" with "GOTO @label".
0そうだね
プレイ済み
返信[30]
親投稿
OlOOlOOl pi_r_round
If you're providing numbers for action shortcuts such as these. ?"1 - explore" ?"2 - rest" ?"3 - eat" And allow only numeric input. INPUT A You could use IF statements something like this. IF A==1 THEN... IF A==2 THEN... IF A==3 THEN...
0そうだね
プレイ済み
返信[29]
親投稿
OlOOlOOl pi_r_round
Those would work, but probably not the way you intended in this situation. If you're prompting for a choice and you store the user's input in A$, the you need to check each possible value of A$. IF A$=="explore" THEN ... IF A$=="rest" THEN ... IF A$=="eat" THEN ...
0そうだね
プレイ済み
返信[26]
親投稿
OlOOlOOl pi_r_round
You have an orphan REPEAT at line 35. Each REPEAT must have a matching UNTIL.
0そうだね
プレイ済み
返信[7]
親投稿
OlOOlOOl pi_r_round
IF "Explore" THEN ... what kind of syntax is that? Should be something like IF A$=="Explore" THEN
1そうだね
プレイ済み
返信[3]
親投稿
OlOOlOOl pi_r_round
Provide a download key.
1そうだね
プレイ済み
返信[1]
親投稿
OlOOlOOl pi_r_round
Have a look into this example.
0そうだね
プレイ済み
返信[7]
親投稿
OlOOlOOl pi_r_round
This version uses sprites. You'll have to play around with the formulas that determine where it's going to move. Right now they produce variable distance between segments, which causes a kind of creepy movement - like a centipede in a box trying to get out.
0そうだね
プレイ済み
返信[4]
親投稿
OlOOlOOl pi_r_round
I'm not really sure what you want, but have a look at this program. Each segment's location is stored in an array. On each movement, the old tail segment is erased and a new head segment is drawn, creating the illusion of movement.
1そうだね
プレイ済み