hi guys, can you tell me how to count how many of a specific sprite are existing and only create a new one when its 0 ? thanks
Develop games in your browser. Powerful, performant & highly capable.
mariogamer - Sprites have a built in value called Count that keeps track of how many there are.
So all you have to do is check if it's 0
e.g.
System->Compare two values->Sprite.Count = 0
I have a spawner object that should spawn one instance of a bullet...so how should I proceed ?
System->Compare two values->bullersprite.Count = 0 > spawnerobject spawn missile sprite ???? like that ?
thanks
or you could make a trigger..
Sprite isOnScreen (invert it)
this will execute whatever actions when there isn't a sprite on the screen. although this doesn't work if you have sprites off screen and you want to count them in your condition.