プレイ日記
*J.P.*[P]£ aj2003aj
ok (thanks to PChicken) i got the background to move... but the sprite dosent stay in the middle, he still moves around, and goes faster than the BG screen, so he will go out of the screen, so just how would i make him stay in the middle of the screen? also, how do you make it so when you touch a certain square (like the floor in the pic) that the sprite wont pass right through it?
4そうだね
プレイ済み
返信[1]
親投稿
PChicken NerdChicken
Your sprite should not have ANY spofs that move it, other than your first spofs to put it in the middle of the screen. Collision is hard, especially with BG, and it is very hard. You can check for the BG tile underneath you with TILE=BGGET(<layer>, <player sprite x>, <player sprite y - 5 or a small number like that>, 1) If TILE is a floor tile, then don't move the BG up and let him jump.
0そうだね
プレイ済み
返信[2]
親投稿
PChicken NerdChicken
(him jumping is the BG layers moving down)
0そうだね
プレイ済み
返信[3]
親投稿
*J.P.*[P]£ aj2003aj
ok, ill do that, thanks.
0そうだね
プレイ済み
返信[4]
親投稿
*J.P.*[P]£ aj2003aj
ok did that but i dont know where the middle coordinates are... how can you tell? right now its just top corner, and i want it in the middle.
0そうだね
プレイ済み
返信[5]
親投稿
PChicken NerdChicken
192,112 there is a section in the manual that tell the screen size
0そうだね
プレイ済み
返信[6]
親投稿
*J.P.*[P]£ aj2003aj
yeah i saw that right after i said that... thanks anyways.
0そうだね
プレイ済み
返信[7]
親投稿
*J.P.*[P]£ aj2003aj
oh and what is/do you mean by playersprite, what is that? like, the sprite im using or what?
0そうだね
プレイ済み
返信[8]
親投稿
PChicken NerdChicken
The character shown in the photo.
0そうだね
プレイ済み
返信[9]
親投稿
*J.P.*[P]£ aj2003aj
yeah, (its like 0,136,???) anyways, thats what i did first, but it said it had a problem, brb, ill show a pic... oh and thanks for the speedy reply.
0そうだね
プレイ済み
返信[10]
親投稿
*J.P.*[P]£ aj2003aj
srry took so long, 3ds crashed, anyways...
0そうだね
プレイ済み
返信[11]
親投稿
PChicken NerdChicken
Y-5,1 not .
0そうだね
プレイ済み
返信[12]
親投稿
PChicken NerdChicken
The correct code is not Y-5.1 it is Y-5,1 comma instead of period
0そうだね
プレイ済み
返信[13]
親投稿
PChicken NerdChicken
Oh, do Y-19,1 instead, i forgot this was coming from top-left of sprite
0そうだね
プレイ済み
返信[14]
親投稿
*J.P.*[P]£ aj2003aj
(in my game) I changed what you said but it did nothing, says "illegal function call in: 0:109(bgget)"
0そうだね
プレイ済み
返信[15]
親投稿
PChicken NerdChicken
Why are you putting so many parameters in BGGET
0そうだね
プレイ済み
返信[16]
親投稿
PChicken NerdChicken
You need the (layer, the middle x of the screen or the player X variable, the middle y of the screen or {the player y variable minus 19}, 1) notice how there are only 3 commas. That means there are ONLY four things you can put into BGGET. And they should be these four things.
0そうだね
プレイ済み
返信[17]
親投稿
*J.P.*[P]£ aj2003aj
#confuzzled.
0そうだね
プレイ済み
返信[18]
親投稿
*J.P.*[P]£ aj2003aj
wait... I think im starting to understand...
0そうだね
プレイ済み
返信[19]
親投稿
*J.P.*[P]£ aj2003aj
... ok... here goes nothing...
0そうだね
プレイ済み
返信[20]
親投稿
PChicken NerdChicken
BGGET gets a character of a background layer, so you would need layer to check with x coordinate y coordinate whether you want to read it in pixel coords or character coords (1)
0そうだね
プレイ済み
返信[21]
親投稿
*J.P.*[P]£ aj2003aj
ok i no longer get a syntax error, and can play my game, but it still does nothing, did i misunderstand you? we have, first: layer (2) then x/y so that is where the sprite is (middle screen) or is it something else? then -19,1 i still dont understand why -19... could you explain a little more? its not important, or whatever, but it just helps me to know...
0そうだね
プレイ済み
返信[22]
親投稿
PChicken NerdChicken
-19 is to go down 19 pixels below the top-left of the sprite to get below the sprite. Sprite coords are based from the top-left. Sprites are 16x16 usually. There is a 3 pixel buffer to ACTUALLY get below the sprite.
1そうだね
プレイ済み
返信[23]
親投稿
PChicken NerdChicken
You're supposed to move the BG up (to simulate moving up) using BGOFS, but not move it if you're hitting the floor tiles.
1そうだね
プレイ済み
返信[24]
親投稿
*J.P.*[P]£ aj2003aj
oh ok, so... brb
0そうだね
プレイ済み
返信[25]
親投稿
*J.P.*[P]£ aj2003aj
almost done... i think... its like a riddle that needs to be solved... nm, its much.... different... bad example...
0そうだね
プレイ済み
返信[26]
親投稿
*J.P.*[P]£ aj2003aj
so i have the BGOFS, the one that moves the background when i move, but how do i make it NOT move when hitting it? do i make another seperate BGOFS? i think im just missing the obvious... ...blagozorp...
0そうだね
プレイ済み
返信[27]
親投稿
*J.P.*[P]£ aj2003aj
wait... got it... i used my handy dandy BG_demo, and the guy who made it explained it to me, and i tryed it on my map with tile 422, tho i couldnt get the moving bg (was too tired) i could tell it worked cause the sprite stopped. anyways ill write the code to fit my game code later (cause its 3am now) if you have a better idea or wanna answer what i said ↑ do that. ...zzz...zzZ,,,zZZZ
0そうだね
プレイ済み
返信[28]
親投稿
PChicken NerdChicken
You know, it was just a matter of an IF TILE != 422 THEN IF VEL < 25 THEN INC VEL,5 ELSE VEL = 0 ENDIF BGOFS 2 OUT BX,BY BGOFS 2,BX,BY+VEL
0そうだね
プレイ済み
返信[29]
親投稿
Joan ambam04
just saw your PLEASE HELP BACKGROUND MOVING or something like that and I have a code that might help co you want it
0そうだね
未プレイ
返信[30]
親投稿
*J.P.*[P]£ aj2003aj
oh thanks, but i found out how to. jusT BGOFS 1,X,Y
0そうだね
プレイ済み