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
→
Exit scene once [X] amount of enemies are killed...
Pages:
1
Exit scene once [X] amount of enemies are killed...
sebstarr
Posts: 259
June 08, 2013, 02:32:58 pm
I'm wanting to add a stipulation to my game. If you have say 10 enemies on a level, you will have to kill at least 6 of them to be able to leave the scene.
I know that some people have done this in the past where it switches the scene automatically. But I'm wanting the user to have to make it to the end of the scene for them to exit the scene. Until they kill 6+ enemies, they will be unable to leave.
rob1221
Posts: 9472
June 08, 2013, 02:59:23 pm
In an actor behavior attached to each enemy, increment a game attribute by 1 in when created. When an enemy is killed, decrement the game attribute by 1. When the player reaches the exit, check the game attribute to determine whether or not to advance to the next scene.
https://twitter.com/Rob1221dev
Pages:
1