• 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!

check_object_in_viewport()

O

Observer_Project

Guest
I want to be able to check whether or not the player is able to see an npc for a check to speak with them in a king's quest style game.

GML:
if(object_in_viewport(object_id,viewsize_x,viewsize_y,player_pos) = true)
{
interactable = true
}
(this allows the code to continue with actions beyond this check)

I don't know how to structure this so that it will work within current gml, the concept is there but I could really use some help getting this to work.

PS: yes I know it would be easier to make rooms and drop the open area of movement just roll with it please
 
Top