problem 8 seems simple enough, i will use pikmiks as a guide and i will not copy his written solution i will only use his steps so i know how to do it: if it doesnt work i can always ask my teacher to help me: i hope problem 8 is easy!!!!!
Problem
You have to hit a character 3 times with a bullet before it dies.
Solution
this one was really strange (well for me anyway) so i dont know what happened but this did happen so oh well… tough luck.
it would be easy to start from problem 4 but if you want to start from scratch be my guest. if you are starting from scratch, you should do problem 4 first then while you still have problem 4 open then you can do problem 8. but i will show you what i have done. i did problem 4 again because i did problem 4 at school and i did problem 8 at home: so you get the picture. ill start by doing problem 4 just for you.
Problem 4- setting the movement
*go to "add sprite" or do Ctrl+Alt+S and get a character and then do the same to get a little bullet.
*then go to "add object" or Ctrl+Alt+O and then click on the little menu thing that pops up on the side and choose the character.
*go to "add event" and then "key press" choose "left". drag over the 8 red arrows known as "start moving in a direction" and click on the "left" key only and set your speed. dont tick relative.
* go to "add event" and then "key press" choose "right". drag over the 8 red arrows known as "start moving in a direction" and click on the "right" key only and set your speed. dont tick relative.
*while you are doing the "left" and "right" you might as well do the "space" one. go to "add event" and then "key press" choose "space". drag over the lightbulb known as "create instance of an object" and click on the "menu" key and choose the bullet and tick the relative box
Test this by putting your character in your room and then playing it by moving left and right.
to make your character stop when the key has been released do the following:
*go to "add event" and click on "key release" and choose the "left" key. then drag over the 8 red arrows known as "start moving in a direction" and when the menu appears, press the "Stop" key and keep the speed at 0.dont tick relative
* go to "add event" and click on "key release" and choose the "right" key. then drag over the 8 red arrows known as "start moving in a direction" and when the menu appears, press the "Stop" key and keep the speed at 0. dont tick relative.
when you have done the character, do the bullet.
*open up your "bullet" object and when the pop up appears, click on "add event" and click "create".
*in the "move" tab, drag over "set the vertical speed" and put a negative in front of it which will make it shoot upwards. click "ok" and not the "relative" button. now test it to see if you can shoot and move. (ill put a picture of problem 4 at the bottom as well of moving left, right and shooting)
Problem 8-hitting the "enemy"
open up your problem 4 game that you have either just done or your previous one and you can do problem 8.
*create your "enemy" object by doing "add sprite" or Ctrl+Alt+S and choose your enemy. then do your creating of an "object".
*open up your "enemy" object, and when the pop up appears, click on "create" event and then go into the "score" tab and drag over "set the number of lives" and when the menu appears, type "3" in the new lives and dont tick relative.
*go to "add event" again and when the menu appears, click on "Step" and choose the first one. drag over "if lives is a value" over and when the pop up appears, keep defaults the same.
*go into the "control" tab and drag over the "blocks"
*in between the "blocks" go into the main1 tab, and drag "change the instance" and change it into the "object explosion" that you should have!!! and have the bottom as "yes". click "ok".
*go to "add event" and click on "collision" choose object "bullet"
*go back into the "score" tab and drag "set the number of lives" and when the popup appears, type "negative 1" in the new lives and tick the "relative" box then "ok". you can delete "change instance into explosion" (i accidentally forot to write that part in the top, oh well)
*test your game to see if it works, hopefully it does. if it doesnt, go onto pikmiks blog and see how he done it, coz i followed his instructions so…
i needed no help with this one but i used pikmik's blog as a guidance.
here are the pictures for you

