![]() Now enter this code instance_destroy(x,y) //Destroy this explosion when animation is done. You can assign them to an object, or set them for an instance in code, and they will respond to most of the sprite instance variables too, so they can be scaled, rotated, coloured and have alpha values changed, all in-game. 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). Once the sprite has been loaded into GameMaker Studio 2, you can use it as you would any other sprite. Now make a Step event and add this code: if hits=1 //Alien dies with exploding gif' now in the create event make a variable: hits=0 So in your alien event add a collision with the laser beam. 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 |