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 stop bullets from fireing
Pages:
1
How to stop bullets from fireing
Blake203
Posts: 23
November 17, 2011, 10:43:59 am
How do I get a bullet to stop firing after 5 shots?
kehwar
Posts: 75
November 17, 2011, 11:12:37 am
You'll need to add a counter to the firing behavior, add a condiniotal to not fire if "counter = 5", and increase the counter it fires...
To reset the counter you add a timer:
if (counter = 5)
do after (3s)
counter = 0
Or make each bullet send a message to the behavior when its killed to decrease the counter by 1
« Last Edit: November 17, 2011, 11:15:47 am by kehwar »
captaincomic
Posts: 6108
November 18, 2011, 08:20:44 am
There is also an "Ammo Pack" on StencylForge that might help you.
Pages:
1