Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I want to check if object exists.
How do I do it?
If Bullet is X on layer"Game" doesn't work
if Bullet is X on screen doesn't work.
In debug it shows no Bullet exist.
Please post your capx that is not working as expected and we might be able to spot the problem.
does this help ?
RamPackWobble I'm curious, if you create a number variable and add an action "Add 1 to variable" from if On-screen event, it keeps adding 1 to infinity, isn't possible to regulate this like add 1 once time each sprite on screen?
Joannesalfa after (is the on screen) event make a sub event with a for each bullet add 1 to variable ?
Develop games in your browser. Powerful, performant & highly capable.
Yes that works - counting how many on screen
There is also the event condition under System "Object UID exists" so you can check if an object currently using that UID currently exists.
And ofcourse you could use bullet.count to see how many instances of the bullet object exist on the layout.
RamPackWobble Good one! it really helps to this thread <img src="smileys/smiley20.gif" border="0" align="middle" />
Well is the 10 time I lost what i wrote...
Bullet.count is not set as a graphical condition. The solution was to declare a constant 0 and to check if 0 is equal to Bullet.count.
System:Compare two values
Bullet.Count = 0