Space Invader trouble

0 favourites
From the Asset Store
Spaces Ambience contains 102 Sounds: 53 track and 49 sounds
  • I converted all sound files to ogg and they work now thank you all.

    I searched about how to add more levels so I know about copying the events and layout and all, but does anyone have a good tutorial on how to add the screen so it says "level 2" when the aliens are all gone, make aliens respawn and all that? I already know how to make them move faster every level though. I also need to be able to lower the fire rate, not a certain amount of bullets; but so you cant fire as many in a few seconds by continuously clicking.

  • Why dont you post you CAPX with what you have got, and let us now, where you got stuck.

    This way, we know where we can help you, and you can learn by doing step for step

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sheep, you enter the realm of "variables"

    All your question can be answered by using them.

    Use a global number that store the level you are currently in, when you start another one just increment it

    For the fire rate, just put that in a variable and instead of every 3 seconds do an every fireRate second then you just have to modify the variable when you need.

    etc :D

  • dl.dropbox.com/u/60325262/soundaddedgameoversolidedges.capx

    Here is my .capx for it, and Yann you totally lost me there. I understand how to make global variables but not their purpose really.

  • in your game, as I remember, you had something like "every 3 seconds, pick random enemy and shot"

    But this value "3 seconds" cannot be changed as it is. You cannot transform an every 3 seconds into an every 2 seconds. 'Cause the value is kinda hard coded.

    However, if you use something that represent a number instead of a real number, you just have to change this representation.

    It's basically what's great about variable.

    Let say I create a variable that represent the fire rate

    let's call it fireRate. And let say it's a global variable 'cause it conserns many objects.

    Ok so we have this variable. Now instead of "every 3 seconds" we write "every fireRate second"

    Now you can modify however you want this representation. If you set fireRate to 2 it will be "every 2 seconds" if you set fireRate to 0.5 it will be "every half a second" etc.

    The same idea goes with "in which level am I ?"

    That's not the true question, the true question is "how many Level did I win?"

    So you can have a variable named "level" to which you add 1 each time you win a level. But as a matter of fact, this value will also represent the level you're in, 'cause each time ou win, your level should increase.

    And then you just have to put in a text box

    set text to "Level "&level

    In short variable are used to control what can vary in a program.

    That's all

  • I think I actually understood that. O.o

    I have to go somewhere but when I get back I will try. Thank you Yann.

    EDIT- (For anyone who has similar trouble) I have fixed my fire rate problem. Meaning I made it so my person fires less often so the player can not simply hold the button and send a crazy amount of bullets.

    What I did was this.

    Add an event.

    System- "Every X Seconds" I set X to 0.3 (You may want slower or faster)

    Add another condition- Select Keyboard and then "key is down".

    (I picked the space bar as my key but you can choose whichever key.)

    After this click "add action" next to the first event "System- "Every 0.3 Seconds"

    Then select your player and click "spawn another object".

    Choose your bullet as the object to spawn, and set it to spawn at Layer 1, image point 0.

    (Unless you are doing space invaders ignore this step)

    Add another action below this one, select your "bullet" icon and then select "set angle", set it to 270.

    Then select "audio", followed by "play" and your sound file for when a bullet shoots.

    After doing all this the player no longer fires as often.

    I put this is all descriptive as I could for those who do not know what to do like I wish I had found.

    EDIT- There seems to be a few bugs with doing this. If anyone can fix that it would be awesome.

  • TITLE SCREEN

    I followed this tutorial scirra.com/tutorials/53/how-to-make-a-port-of-1945-using-construct/page-7 on making a title screen. For those of you who do not want to watch the video I will explain how to make one.

    First off create a new layout, we will call it "Title Screen".

    When it asks if you wish to create an event sheet along with it select "Add event sheet".

    By this point in your game I will assume you have already learned about sprites and all of that jazz so we will not get too detailed on them.

    First, add your sprite (If you created one) for the title of your game.

    Center it as best as you can wherever you wish. (top, middle, bottom, side, wherever)

    Next, double click outside of your game area (the white space around your game) and when the object tab opens, select "Text" under the "General" section.

    Depending on what you wish your game to say make the text say something along the lines of "Play" or "Click here to play". Title this text object as "Play". (You can use whatever but the rest of this will make more sense if you use that)

    Yet again center this where you want it.

    Customize the color, font, size, etc. how you wish.

    For now we are only worrying about the "Play" text so don't add any other texts just yet.

    Go to your "Event Sheet" (be sure to remember which one applies to this layout) and click "Add event"

    (We will assume you want to click with the mouse, if not do the same but with a keyboard function)

    Select the "Mouse" icon, and then click "On object clicked".

    Choose whether you want it to work on left or right click, and leave "Click type" on "Clicked".

    Where it says "Object clicked" select the text icon that says "Play" we created earlier and hit "Ok".

    Next to this event we just created for the mouse click "Add action".

    Go to the "System" icon and find "Go to layout". Select "Go to layout" and then choose "Layout 1" or whatever your game layout is titled.

    Run your layout and your title screen should be the first thing to show up. You should be able to click "Play" (or whatever you put) and it should take you to your game.

    If for some reason it takes you to your game first, go back to Construct 2 and drag the tab that says "Title Screen" and put it on the right on the one that says "Layout 1" or whatever your game layout is titled.

    If you did everything right you should now have a title screen that you can interact with. Just as you did with the "Play" button. You can add more sprites/text objects to interact with by doing the same thing but using their respective names.

    FOR EXAMPLE- Let's say you want to add one of your characters to the title screen so people can click them and go to a page that has his/her/it's biography or something.

    You would add the sprite, follow the same steps (creating a new layout, event sheet, and all) and create his biography page.

    The sprite would have to be put into your "Title Screen" layout, but when you do the steps for clicking it with your mouse, you change the layout it goes to, to the layout you created his biography in.

    If you have any questions on this feel free to comment here and I may (or may not depending on how far in the future you respond) help you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)