How to stop bullets from fireing

Blake203

  • Posts: 23
How do I get a bullet to stop firing after 5 shots?

kehwar

  • Posts: 75
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
There is also an "Ammo Pack" on StencylForge that might help you.