1st is OK i have done it
2nd for Giving Star
condition end of layout is not working for me
but when i gave condition touch the target then stars are working
Hello
I think I can help.
1-
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.
2-
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