プレイ日記
Jacob KulcakKid4
How would I use SPHOME so that the sprite doesn't go out of the bounderies when it gets bigger? (it doesn't do that when it's at normal size)
2そうだね
プレイ済み
返信[1]
親投稿
PChicken NerdChicken
i think what you want to do is use SPSCALE OUT and use the values from there in your bottom and right collision codes.
0そうだね
プレイ済み
返信[2]
親投稿
MathPRG MathProgrammer
He's not asking about collision. The problem is that, since the reference point for commands like SPSCALE is by default (0,0) the top left corner is where the command works around. Therefore you need to change this point - that's what SPHOME does. Your sprite is a 16*16 pixel one, right? This means you should use 'SPHOME control number,8,8'.
0そうだね
プレイ済み
返信[3]
親投稿
Jacob KulcakKid4
I did it like the example said (yes, sx and sy are the variables) but it just says error.
0そうだね
プレイ済み
返信[4]
親投稿
MathPRG MathProgrammer
The syntax for SPHOME is usually: SPHOME control number, x offset, y offset It is ideal to use (width/2) and (height/2) as the X and y offsets respectively, as this will make the center of the sprite the center for commands like SPSCALE.
0そうだね
プレイ済み
返信[5]
親投稿
Jacob KulcakKid4
Yeah, I already have enlargement collision complete. let me try what you said, MathPRG.
0そうだね
プレイ済み
返信[6]
親投稿
MathPRG MathProgrammer
What kind of error? A syntax error?
0そうだね
プレイ済み
返信[7]
親投稿
Jacob KulcakKid4
Sorry, I'm trying to do something with Hanzo on this game and I can't do this Until I hear from him. I'll make a new post once it's done.
0そうだね
プレイ済み
返信[8]
親投稿
Hanzo rzsense
I'll answer you when I get off work.
0そうだね
未プレイ
返信[9]
親投稿
Jacob KulcakKid4
Ok. (no offense, but I thought you were younger)
0そうだね
プレイ済み
返信[10]
親投稿
Hanzo rzsense
Try to modify your program as follows. 1) Write "SPHOME 1,8,8" just behind "SPSET 1,502". 2) Write "IF(X MOD 16)>=4 &&(X MOD 16)<12 &&(Y MOD 16)>=4 &&(Y MOD 16)<12 THEN" instead of "IF((X MOD 16)>=12 || (X MOD 16)<4)&&((Y MOD 16)>=12 || (Y MOD 16)<4)THEN". 3) Write "BGGET(0,X,Y,1)==869" instead of "BGGET(0,X+8,Y+8,1)==869".
0そうだね
未プレイ
返信[11]
親投稿
Hanzo rzsense
I guess the reason why you thought I was younger is my poor English.
0そうだね
未プレイ
返信[12]
親投稿
Jacob KulcakKid4
Ok, I'll try that when I get back from somewhere. And your english is really good if it's not the main language you speak. I thought you were younger because almost everyone on miiverse are kids talking about video games.
0そうだね
プレイ済み
返信[13]
親投稿
Jacob KulcakKid4
@Mathprg or @Hanzo or whoever, this is how far the sprite goes in the top-left corner when I put SPHOME 1,8,8 just after SPSET. I hope this helps.
0そうだね
プレイ済み