for example: when key is pressed and there are less than 4 bananas on screen -> create a banana
Trying to find a way to make this work without using families or extra global variables.
Develop games in your browser. Powerful, performant & highly capable.
Objects have a count property that returns the number of that object that currently exist. So something like this is what you want
banana.count < 4 and key pressed, create banana[/code:11bce29n]
could do it like so
got it, thanks guys