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

Counting active objects in the room

O

Oliver Marshall

Guest
Hi all

I want to update my debug file script to include information about the objects on screen and in the room.

Is there a way to easily count the number of active objects both in the view, and in the room?

Olly
 

FrostyCat

Redemption Seeker
For a room-wide count, see instance_count.

For a view-only count, see with block recipe cards (Count the number of instances satisfying a condition; assuming that you use GMS 1.4, your condition is point_in_rectangle(x, y, view_xview[0], view_yview[0], view_xview[0]+view_wview[0], view_yview[0]+view_hview[0])).
 
Top