B
Bhreno
Guest
I'm trying to do this: with the variables, I need to check the amount of obj_ball in the room and each variable must count the amount of a specific obj_ball sprite.
The perfect code for my problem would be a ... "sprite_number", with the same function as "instance_number", but "sprite_number" does not exist and it is necessary to find another way to count the number of sprites in the room.
(following example of the code I'm looking for).
How can I do this check?
The perfect code for my problem would be a ... "sprite_number", with the same function as "instance_number", but "sprite_number" does not exist and it is necessary to find another way to count the number of sprites in the room.
(following example of the code I'm looking for).
Code:
with (obj_ball)
default_ball = sprite_number(spr_default_ball); // this should give me an amount of "default_ball" sprite obj_ball that exists around the room. The same applies as other variables. And this check should happen all the time.
yellow_ball = sprite_number(spr_yellow_ball);
blue_ball = sprite_number(spr_blue_ball);