0

CubicleHead 2021-05-02 00:06 (Edited)

this question is similar to:

https://lowresnx.inutilis.com/topic.php?id=1848

but i was wondering how to see the x flip of a sprite using =sprite.a(n)

i couldnt understand the answers in the above link

thx

was8bit 2021-05-02 03:08

It takes bit math..

Just use the READ portion of this code... must include the global variables...

was8bit 2021-05-02 03:09 (Edited)

CHARFLP will yield a number 0-3 which combines both x and y flips into one number...

I "think" 1 means x flipped but not y, 2 means y flipped but not x (you may need to test to be sure, i may have that backwards)

0 means neither x or y is flipped, and 3 means x and y are both flipped...

Timo 2021-05-02 09:48

Short answer, this should work:

IF SPRITE.A(0) AND %1000 THEN PRINT "FLIP X"

(But I didn't test it now.)

The "AND" is used as a binary "and", not a logical. (Although in LowRes NX it's technically the same.)

CubicleHead 2021-05-02 12:13

thx :)

Log in to reply.