プレイ日記
BeefJerkey SuperBeefJerkey
Here is my code, Hanzo. There is more code above, but that is for the intro and selecting the number of players.
0そうだね
プレイ済み
返信[1]
親投稿
BeefJerkey SuperBeefJerkey
After entering in the code you provided, the blue car (sprite definition number: 1) is now offset. Also, I mistakenly said A button, I meant Left Arrow. I changed the code to use that instead.
0そうだね
プレイ済み
返信[2]
親投稿
BeefJerkey SuperBeefJerkey
Wait I got it! X is a variable!! And X plus how many times pressed equals X position!
0そうだね
プレイ済み
返信[3]
親投稿
BeefJerkey SuperBeefJerkey
There! I set the X and Y variables for the car, as well as X and Y variables for the other three cars. Now I just need button commands for the other three. But before, I've realized that two buttons being pressed at the same time causes it to not react at all. Can I have help with that?
0そうだね
プレイ済み
返信[4]
親投稿
BeefJerkey SuperBeefJerkey
Oops, missed those X's right under VSYNC. I fixed that.
0そうだね
プレイ済み
返信[5]
親投稿
Hanzo rzsense
The method is so simple. Replace line 61 with follows. X1=X1+((K AND #LEFT)!=0)*2 X2=X2+((K AND #B)!=0)*2 X3=X3+((K AND #L)!=0)*2 X4=X4+((K AND #R)!=0)*2 If you replace "*2" by greater value, the car will move faster.
0そうだね
未プレイ
返信[6]
親投稿
BeefJerkey SuperBeefJerkey
Hm. Maybe I had trouble with multiple buttons before because I wrote the code differently.
0そうだね
プレイ済み
返信[7]
親投稿
BeefJerkey SuperBeefJerkey
And thanks. While waiting for your response, I had already figured out the speed change thing. The Race mini game works good now, I just need to add the SPHITSP commands so it knows who won. And the ACLS command to clear text. Thank you!
0そうだね
プレイ済み
返信[8]
親投稿
Hanzo rzsense
AND is the most often-used operator to detect multiple button pressing. If you press L without pressing R, ((K AND #L)!=0)==TRUE, ((K AND #R)!=0)==FALSE If you press R without pressing L, ((K AND #L)!=0)==FALSE, ((K AND #R)!=0)==TRUE If you press both L and R at the same time, ((K AND #L)!=0)==TRUE, ((K AND #R)!=0)==TRUE
1そうだね
未プレイ
返信[9]
親投稿
BeefJerkey SuperBeefJerkey
I'm now having trouble with the finish line. Only will Player 1 actually activate it. The Finish line is actually a 16x16 sprite, re-scaled. Maybe that messed up the collision box?
0そうだね
プレイ済み
返信[10]
親投稿
Hanzo rzsense
SPCOL N,TRUE should be followed by SPSCALE. The second argument of SPCOL allows collision detection area to follow sprite size, but if SPCOL N,TRUE is done after SPSCALE, size of collision detection area will be kept the state before SPSCALE is done.
0そうだね
未プレイ
返信[11]
親投稿
BeefJerkey SuperBeefJerkey
Oh... Well, I already worked around it by creating three large sprites and lining them up, making sure none of the cars miss the collision boxes. Thanks, though.
0そうだね
プレイ済み