• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Way to determine if player is on upper or lower half of screen?

My rooms vary in size, but the view is ALWAYS 320 x 240.

So, I'm wanting to determine if the player is on the upper half of that 320 x 240 view or the lower half so that
I can display text boxes accordingly. For example, if the player is on the lower half... then the text box should appear on the upper half and vice versa.

I already have a global.playeryposition that determines where the player is located at ALL times.

How would I achieve this?
 
if (player_y - view_yview) > (view_hview/2) then player is in lower half of view.

If using gms2, use corresponding camera get functions (look in manual under "cameras" section of gml reference).
 
Top