LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

SPCOL id, TRUE not functional?

Root / Programming Questions / [.]

MinxrodCreated:
Hello! I’m trying to use he “match scale” form of sprite collision, but it doesn’t seem to work. Example: (This is in SB4)
ACLS
SPSET 0,0
SPSCALE 0,2,2
SPCOL 0,#TRUE 'I did try re-ordering this to before the SPSCALE.

SPSET 99,0
SPCOL 99,#TRUE

?SPHITSP(99)
SPOFS 99,18,18
?SPHITSP(99)
Output:
0
-1
Does anyone know why this occurs, or how to fix it? Thank you.

Try using SPSCALE after SPCOL, maybe

The order of SPCOL/SPSCALE turned out not to matter; it only worked when using SPHITSP(99, 0).. Is this a bug or am I doing something wrong here?

I tried putting SPSCALE after SPCOL and it worked. (Both SPHITSPs output 0)

I tried to do that and nothing changed. My test code looks like this:
acls
spset 0,0
spcol 0,#true
spscale 0,2,2

spset 99,0
spcol 99,#true

?sphitsp(99) '0
spofs 99,18,18
?sphitsp(99) '-1
I consistently get 0:-1 with the second sprite. [V4] I just tried the exact same code in V3 and it worked. It might be a v4 issue/change?

Yeah it might just be a bug in SB4, idk

It's confirmed as a bug on this page: https://sup4.smilebasic.com/doku.php?id=bug

So this is fixed, and the scaled hitbox DOES work. Rotations do not work, it uses the non-rotated hitbox (This is probably intentional, but also part of my problem.)

So this is fixed, and the scaled hitbox DOES work. Rotations do not work, it uses the non-rotated hitbox (This is probably intentional, but also part of my problem.)
Rotations have never worked unfortunately.