プレイ日記
*J.P.*[P]£ aj2003aj
this is the last post on this subject. (hopefully) i would like to make tile #422 stop the sprite, like so it dosent pass through it, like an object, like yeah this post. (lol jk) so PChicken helped me out, a lot (@PChicken, if your reading this, thank you) but i still dont have it fully... done/correct as it still does nothing. if you can just help finish this it would be GREATLY appreciated.
5そうだね
プレイ済み
返信[1]
親投稿
Hylian Yveltal2001
just make it detect where the sprite is and not where the tile is itself. like you have your sprite coords, use those coords to check if it is on that tile.
0そうだね
プレイ済み
返信[2]
親投稿
*J.P.*[P]£ aj2003aj
oh! *and the clouds parted as i pressed home button to try that*
0そうだね
プレイ済み
返信[3]
親投稿
*J.P.*[P]£ aj2003aj
wait, how do i make it check what tile hes on?
0そうだね
プレイ済み
返信[4]
親投稿
Hylian Yveltal2001
You just use BGGET and use the sprite's coords as reference.
0そうだね
プレイ済み
返信[5]
親投稿
Hylian Yveltal2001
Also, you might need to use SPHOME to center the sprite's "home" and you could use the distance formula detect and prevent the sprite from gettig 8 pixels away from it
0そうだね
プレイ済み
返信[6]
親投稿
*J.P.*[P]£ aj2003aj
ah, ok. thanks (i dident use sphome so ill go do that and whatever else
1そうだね
プレイ済み
返信[7]
親投稿
*J.P.*[P]£ aj2003aj
well... uh... i was doing what you said with the sphome, and... theres another code messing with it i think, i did it but the sprite stayed in the top left corner and was acting all weird. ill look 4 the code tomorrow, and what about 8 pixels? ...? so once i finish this (and it actually works) if i want to use more tiles just copy and paste the code and change tile #? or does it get harder...?
1そうだね
プレイ済み
返信[8]
親投稿
PChicken NerdChicken
If you want to do side-side collision it gets harder. There is a lot of logic involved.
1そうだね
プレイ済み
返信[9]
親投稿
PChicken NerdChicken
Find the other code that messes with SPHOME using the Search tool (magnifying glass) and see if it does anything important.
1そうだね
プレイ済み
返信[10]
親投稿
*J.P.*[P]£ aj2003aj
ok well this is basically all my code (excluding the title screen, part of jump code and the code in the posts pic.) not much, but i think i misunderstood the sphome funtion... its sprite, and sprite coords right?...? or do i have this all wrong... when i put it, it made the sprite go back to the top left corner. tell me what to do please
1そうだね
プレイ済み
返信[11]
親投稿
PChicken NerdChicken
Do SPHOME 0,8,8 SPHOME defines the center of the sprite. By default, it is 0,0.
1そうだね
プレイ済み
返信[12]
親投稿
*J.P.*[P]£ aj2003aj
ok i did that. still does nothing. what do i need to add next?
1そうだね
プレイ済み
返信[13]
親投稿
PChicken NerdChicken
Are there any more SPOFS contained in your code?
1そうだね
プレイ済み
返信[14]
親投稿
*J.P.*[P]£ aj2003aj
nope, only the one you see.
1そうだね
プレイ済み
返信[15]
親投稿
*J.P.*[P]£ aj2003aj
well i gtg, ill be back around 7-11pm.
1そうだね
プレイ済み
返信[16]
親投稿
*J.P.*[P]£ aj2003aj
I was on smilebasicsource when I saw someone who said it needed the BGCOORD code, is it the same with my code? if so, I don't have one yet.
1そうだね
プレイ済み
返信[17]
親投稿
PChicken NerdChicken
i don't think you need bgcoord, as you're dealing with pixel units and not bg characters.
1そうだね
プレイ済み
返信[18]
親投稿
*J.P.*[P]£ aj2003aj
yeah, still confused about that... im trying to make tile #422 stop the sprite when it hits it, but in order to do that i need pixel (forgot what its called) . whatever...
1そうだね
プレイ済み
返信[19]
親投稿
PChicken NerdChicken
you have the pixel one already
1そうだね
プレイ済み
返信[20]
親投稿
PChicken NerdChicken
you have the option for it set in your BGGET command
1そうだね
プレイ済み