TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
How to limit the number of specific type actor on screen at a given time
Pages:
1
How to limit the number of specific type actor on screen at a given time
drxboxlive
Posts: 13
July 27, 2016, 06:13:02 pm
Hi guys, I was wondering if any of you new how to set a set number of a specific type of actor that could be allowed on screen at a given time. Like for instance. I would only want 10 actors of a specific type to be able to spawn at any time. thanks.
JeffreyDriver
Posts: 2262
July 27, 2016, 07:09:43 pm
Have a look at SCENES > ACTOR > GET ACTOR
There's a block that will let you check for types of actors. I'd use a number attribute to count the actors.
As long as the attributes value is less than 10, keep spawning actors. If the attribute value is equal to or greater than 10, stop spawning.
Current Projects:
The Grand Grimoire Chronicles Episode 3
Twitter@JeffreyDriver
apps.jeffreydriver.co.uk
Pages:
1