Extended!
Top Down Shooter - A game making guide
Hello geekimo.com users this is Cloud obviously
. Well Im here with another tutorial for game maker 6 users. This is the extended top down shooter tutorial or (TDS) and in this tutorial we will be adding, Switches and doors, HUD (healthbar and money ect), and text. It will vastly improve your game and hopefully get it noticed. When its big remember me lol
.LINKS:Part 1
GAMEMAKER6.1
-x-x-
Chapter 1 - Adding switches that open doors and blow things up!
So youve probably carried on from where we have left off. If so add a sprite. Call it button_spr. Now make a top down view of a button not pushed (we made a 32x32 red square) And copy and paste it modify it to make it look like its been pushed. There are now 2 subimages to our button_spr. Subimages are the images in the sprite. Use theese for animation. they represent frames.
Now add a new sprite and call it crate_spr and draw a top down crate. (We can use this for opening doors that shut as soon as you move from the switch we move a crate there the switch will stay on and you can pass through) Right clikc the sprite folder and click add group call the group misc sprites. And add crate_spr,button_spr into it using drag and drop. This manages our sprites for easy access in the future. Now ad an object and call it button_obj. And make its sprite the button_sprite. Add event step and step and add this code:
Code: [Select]
{
image_speed=0;
if buttonpressed=true
{
global.activateno1=true
}
}Explanation:This makes our sprite button not animate itself so it looks like its not been pressed. And it will activate a variable that we will use for our door. We made this before the variable "global." so that it refers to every object in game. But only one of our ojects will understand it. The door which we will make later
x-x-x
now add this for the create event:
Code: [Select]
buttonpressed=false;Now we add a collision event with player_obj and add this code as the action:
Code: [Select]
{
image_index=1;
buttonpressed=true;
}Explanation:This will make the button sprite change to look like its just been pressed. And it will set the buttonpressed variable to true so that the button knows the player has touched it and will animate to open the door make the explosion ect.
x-x-x *WILL EDIT TOMORROW*


Logged
