Shooting question

martamarta5

  • Posts: 3
Hey!
I'm working on a project, it is a Mario-style game.
My problem is shooting related, does anyone know to make limited shootings? I mean, I have a counter of bullets and I want the number of bullets there to be the amount of bullets that you can shoot.
I hope you understand my question, and know the answer.
 :)

NickamonPoppytail

  • *
  • Posts: 1114
There is a behaviour for this that is built in to Stencyl. This allows you to customise this and more.
Upcoming Projects
Poppytail 5 and Pixeltail: Fifth and sixth main instalments in Poppytail series. A Game About Trimming Hedges: Final Version: An updated version of the original AGATH. One Million: Last-one-standing style small project. The Poppytales: Platformer boss rush with character collecting. Skies n' Fall: Boss rush shooter prequel to Rise n' Brawl. Precious: Weird platformer. Christmas Time 2: Sequel to Christmas Time 1.

JeffreyDriver

  • Posts: 2262
If you've already got your counter, increment it by 1 every time a bullet is created, and decrement it by 1 when a bullet is killed.

The second bit of your code checks the value of the counter and creates a bullet or not, depending on the value.

For example:

If COUNTER < 3
Create bullet

You can add an OTHERWISE statement if you want something to happen if the bullet limit has been reached.

Vaibhav Sangwan

  • Posts: 161
you can do it by making a boolean attribute too.
Just set it to false every time you  create a bullet and then after a limited time, set it to true again.
Currently working on:-
http://www.stencyl.com/game/play/42376
Feedback will be really appreciated

corbanwolf

  • Posts: 223
You can also use this
♪♪♪♪♪♪