Log In  

Dear all,

I'm trying to get my head around functions (in general, not just _init, _update & _draw) and I'm looking at the platform tutorial, PicoJump, in issue 2 of the fanzine. There's a function named CANFALL() that I'm having a problem with deciphering...

FUNCTION CANFALL()
V=MGET(FLR((PX+4)/8),FLR((PY+8)/8))
RETURN NOT FGET (V,0)
END

I understand the MGET line and how it's placing the value of the tile underneath the player into to the variable 'V'; however, I don't understand the line:

RETURN NOT FGET (V,0)

I can't work out if it's returning true or false based on sprite V!

Any pointers for a layman like me?

Many thanks.

T.

P#46738 2017-11-27 10:37 ( Edited 2017-11-28 12:27)

Believe it or not, this exact same question got answered just earlier this week! Check tarek's response.

P#46741 2017-11-27 12:09 ( Edited 2017-11-27 17:09)

Oh my goodness - I do apologise. I was checking for help on Functions and, naturally, got about 1000 hits!

Thank you for the link.

P#46781 2017-11-28 07:27 ( Edited 2017-11-28 12:36)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 20:14:37 | 0.005s | Q:10