Now enter this code instance_destroy(x,y) //Destroy this explosion when animation is done. Now hold on we need to make the explosion object!Īdd an event called Other and in the list of items click Amination End (if i am correct that is what its called). Now make a Step event and add this code: if hits=1 //Alien dies with exploding gif' This worked particularly well for the my project which is a. A total of a spritesheet in gamemaker with 9 subimages/frames, but this code should work for however many frames you have or need. now in the create event make a variable: hits=0 Note this is simple movement animation based on key-press/hold with 8 walking frames (2 up, 2 down, 2 left, 2 right) and 1 static frame for not moving. So in your alien event add a collision with the laser beam. I would like to make my sprite stand still when not moving and animate when keys are pressed. So if your laser beam is an object and not just a drawn event image, thats good and what we need. Or to be way simpler make three more seperate images of the alien, Make a normal image of the alien, a green, a yellow, a red, and look online for some explosion gif. So the alien image make three more image indexes. I tried this and it works perfectly, if you would like the gamemaker file, tell me.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |