I have try this method
now one problem is occurring
i insert sprite for counting bullets
and there are 11 frames 0,1,2,3 ... 11
0 for nothing and 11th for 10th bullet
i gave variable 10
but when I test shooting
at starting it works fine but when there 2 bullets remaining both goes invisible together and after being blank gut hitting 1 bullet
in short counting wise bullets are OK but visibly last two bullets goes out together
pls help me at this
actually i have done a big mistake which give me headache for two days
i was thinking what wrong i m doing
even i have checked every event step by step
Actually in 1st frame of bullet i have somewhere clicked anchor point by mistake
today when i was again checking every frame then i notice that in every frame anchor is shining and in 1st frame it was missing
I think I can help.
For your first problem, I don't know if this is the better way to do this, but this is how I've done it in all my games so far.
Create a sprite to display the amount of bullets you want, and set the each frame with a number of bullets.
For instance, in the frame 0 you put nothing, at frame 1 you draw 1 bullet, at frame 2 you draw 2 bullets and so on. Then you create a variable to keep track of the amount of bullets the player still have, starting with 10 and decreasing every shot. And for last every time the player shoot you create the condition to decrease the value from this variable and at the same time set the frame of your sprite to the value of your variable. Therefore, if the variable is 10, the sprite frame will be 10 and it should display 10 bullets, after you shoot the variable should change to 9 and then the sprite frame should change to the value of the variable ( 9 ) displaying then... 9 bullets.
This is quite simple actually, all you need to do is at the end of the game is check the remaining bullets o-o
You know the player starts with 10 bullets, so if he finishes the game with 9 this means the shot only once, give him 3 starts. Nothing much to explain here.
Hope I could help