GameMaker: Studio - Alarms & Projectiles

Поделиться
HTML-код
  • Опубликовано: 23 дек 2024

Комментарии •

  • @flashr9684
    @flashr9684 10 лет назад +3

    I would just like to say, I have a game design class in school, and you are going to bring me leagues ahead of everyone in the class. Learning this stuff from you is going to make doing my work in the class that much faster, and make my games that much better when it comes to creating my own for the class. Thanks a ton!

  • @BrotherKaif
    @BrotherKaif 11 лет назад

    Great tutorial Shaun! These are easily the best Game Maker tutorials on the internet. They're great because they are thoroughly covering the basics. Keep up the good work!

  • @MMOPlayersUnite
    @MMOPlayersUnite 12 лет назад

    good job , i'm new to making games been watching other tutorials for a while it's nice to find tutorials that actually teach something, most are just too long and don't really contain any real info, you actually stick to one thing on each video

  • @KabooM1067
    @KabooM1067 9 лет назад +58

    Lol it's not bizarre, it's how we use it in Math and Engineering. Thank God. What's weird is the coordinate system. Why is negative y down and why is the origin points to the top left?

    • @KabooM1067
      @KabooM1067 9 лет назад +14

      I meant why is positive* Y down

    • @8sblack
      @8sblack 8 лет назад +8

      +prepareuranus
      It's because the game draws everything from the top left, like reading. It's just more convenient than having to put "-" after every y value in code.

    • @KabooM1067
      @KabooM1067 8 лет назад +7

      CompletelyGarbage
      Oh that makes sense. I still always have to go back and change vertical speed and position values because it just doesn't stick in my brain.

    • @8sblack
      @8sblack 8 лет назад +7

      +prepareuranus
      Yeah, it's definitely weird compared to most math and sciences. I kind of just like to think that the positive y going down is similar to a force vector in physics in that it's heading towards the direction of gravity.

    • @BigBossKeruda
      @BigBossKeruda 8 лет назад

      i feel u xD

  • @shamneo23
    @shamneo23 11 лет назад

    just wanted to say, you're tutorials are amazing.. very detailed and you explain what you're doing with the codes very well.. much better than the F1 help. please do keep these tutorials coming. well done!

  • @damarque8gamingstudio489
    @damarque8gamingstudio489 9 лет назад +1

    Thank you for making fantastic, easy to follow tutorials! My game is taking shape all thanks to your videos!

    • @crylune
      @crylune 9 лет назад

      DaMarque8 Gaming Studio Same here :)

  • @ceciliahsu928
    @ceciliahsu928 9 лет назад +1

    Thank you for making these! They're very clear and thorough. As a beginner I'm eternally grateful haha

  • @heatrayzvideo3007
    @heatrayzvideo3007 11 лет назад

    Keep making the videos, they are the most useful and informative on RUclips for game maker that I have seen.

  • @niklascarlberg
    @niklascarlberg 12 лет назад

    Thank you for the videos. They are really helpful in getting a feel for the program.
    Regarding the "bizarro angles", they just correspond to regular trigonometry, where x is right and y is up. Sin() is the y component of a vector and cos() is the x component. Sin(90) is therefore 1 and cos(90) = 0.

  • @MisterMajister
    @MisterMajister 10 лет назад +2

    Awesome video! However, if you add the event "Key Release" with the code "alarm[0] = -1" the shooting will stop as soon as you release the assigned key. This is very helpful when having bigger values on your alarm, e.g. if you want to "charge" a bigger weapon. I hope i'm making any sense at all!

  • @Magnenator
    @Magnenator 11 лет назад

    Great tutorials, Shaun, these are really helpful. I altered things a bit here, because I didn't like that there was a delay (the duration of the alarm) between pressing space and the bullet creation.
    For an instant shot, move the instance_create function from the Alarm 0 event into the 'if' statement of your 'space' event code. You can delete the code action from the Alarm 0 event, but an action must be there for the alarm to reset properly. I just used the "Exit this event" action.

  • @coxyofnewp
    @coxyofnewp 12 лет назад

    It's great to see your keeping the series going !!
    I think your doing a great job at explaining the events etc..
    Keep up the good work and look forward to following your tutorials !!
    ps thanks for making the effort to keep the keyboard noise down.. many thanks..
    as it would be a great shame,as these are VERY GOOD tutorials.
    pps could we suggest ideas we would like to see you implement? and you show us how?

  • @Gee0F
    @Gee0F 11 лет назад

    Thanks for these tutorials!
    They're definitely better put together then other tutorials I've see on youtube!

  • @daj4k
    @daj4k 12 лет назад

    Tthis must be fate! from the last 5 hours we found your videos. nice to see i am up to date already with more to come! Friday my friend and I decided we wanted to make a game! Now on my second program and I must say that Game maker is way better you make things simple, and challenging us to try different things with what we have seen so far! Great videos will be watching to see what elements we could try next!

  • @BibbusTV
    @BibbusTV 11 лет назад +5

    the circle is laid out in the way of the unit circle for calculus

  • @brianrick
    @brianrick 11 лет назад +1

    Shaun, thanks for all the great videos. I've learned so much from you, but I think I have a much better way of doing this. I find using your technique that it creates a delay because the alarm is starts when you trigger the space event. So, inside the create event I set a variable can_shoot = 0. In my space event I use the code
    if(can_shoot = 0)
    {
    instance_create(x,y,obj_player_bullet);
    alarm[0] = 15;
    can_shoot = 1;
    }
    Then in the alarm event I reset the variable can_shoot = 0.

  • @JoeTheSmiter
    @JoeTheSmiter 10 лет назад +21

    Those "bizarro direction angles" are just the way math always lays out degrees.

    • @bobbymcbones9028
      @bobbymcbones9028 3 года назад

      bro those bizarro direction angles made my day don't @ them
      sorry this comment is 7 years late :/

  • @b3dog1
    @b3dog1 11 лет назад

    I find your tutorials very informative slow and descriptive. Thank you so much!

  • @Nick-bu5lu
    @Nick-bu5lu 10 лет назад +3

    can you make a playlist with all space game tutorials?

  • @PhillBlackProduction
    @PhillBlackProduction 11 лет назад

    The main reason the directions are done in the counterclockwise is because in Trigonometry, degrees are done with a coordinate plain. So the quarters of the circle, 0 to 90 (quadrant I), 90 to 180 (quadrant II), 180 to 270 (quadrant III), 270 to 360 (quadrant IV) all relate to a grid. So the perceived notion is that positive angle measures start by heading upward, and negative head downward.

  • @carlizancho2
    @carlizancho2 11 лет назад

    Great tutorials Shaun, hope you keep doing more of this.

  • @FreeGamersSoft
    @FreeGamersSoft 12 лет назад

    Shaun i had a great Christmas and i love your tutorials keep up the good work :)

  • @luisciphere
    @luisciphere 12 лет назад

    best gm tutorials on youtube! Thanks man!

  • @TofuToons
    @TofuToons 8 лет назад +6

    The direction numbers aren't weird. They're based on the 360° on a circle, being 180° a straight horizontal line.
    I guess they didn't want to change it because that's the direction people is used to think when they hear those numbers. As long as you're aware it's based on a circumference's rotation, the numbers aren't weird at all.

    • @TofuToons
      @TofuToons 8 лет назад +2

      Zarkin 02 Are you sure about that? I'm pretty sure every country has 0° at the right and 90° when it's aiming straight up.
      Although, I wouldn't be surprised if some countries decided to change math. I mean, the United States likes having a different measure system from the rest of the world.

    • @alvin_row
      @alvin_row 8 лет назад

      Zarkin 02 I live in Chile and here it's just like Guillermo said... 90 means up and 0 = right.

  • @tiaoferreira
    @tiaoferreira 8 лет назад

    TKS for this tutorial, friend! I replace spacebar by "Z" for set shootkey, because spacebar causes a crash when pressed together arrows. Most of indie developers now use the "Z,X,C" scheme foraction keys on their games. The only problem is with german keyboards, because their keyboard layout is different, but it is'nt the end of the world :D

  • @UncrushableHope
    @UncrushableHope 9 лет назад +18

    I'm fairly certain good sir, that the mathematical world at large shares this software's "bizarro direction angles." However I would be remiss if I failed to say that each person is entitled, even though it be opposed to the unit circle, to his own opinion.

    • @buddyroach
      @buddyroach 9 лет назад +8

      +TheMightyBoolean you from the turn of the century, old chap?

    • @UncrushableHope
      @UncrushableHope 9 лет назад +6

      Alas, I did not quite make it.
      en.wikipedia.org/wiki/George_Boole

  • @eladiozro
    @eladiozro 10 лет назад

    Thanks Shaun Spalding, i'm learning how to make my game very easily thanks to you!

  • @YummyFreelunch
    @YummyFreelunch 10 лет назад +1

    I just want to thank you for your videos, they're very informative and I appreciate your taking the time to do them :)

  • @sollidwarren
    @sollidwarren 11 лет назад

    Great tutorial dude. I was wondering if you have done any tutorial for animating sprites(using gml to set conditions if possible), and tips on android devices like press/click vs long press/hold click functions

  • @naralas4737
    @naralas4737 6 лет назад +1

    Quick question about the idea of an alarm being set to 9 whenever you press spacebar... does that not mean that you have a frame delay from hitting spacebar to shooting? Which for 60fps is 15ms of latency built into your game?

  • @Dag0suu
    @Dag0suu 8 лет назад +2

    when i use the alarm there is a delay after i press spacebar then the ship shoots the bullets. Is there a way to remove that delay?

  • @Watafak4000
    @Watafak4000 10 лет назад +11

    The layout of the angles is basic trigonometric conventions. Be thankful it isn't on radians! Other than that, great video, very helpful!

    • @AnjoloSilva
      @AnjoloSilva 10 лет назад

      I just noticed that, cuz i'm studying that right now at school.

    • @elijah4973
      @elijah4973 6 лет назад

      I didn't know the god of death was interested in programming!

  • @FnulnuTG
    @FnulnuTG 12 лет назад

    terrific videos! i do have a small request, could you do a tutorial on particles and other effects?

  • @thaillistproducer
    @thaillistproducer 9 лет назад +1

    Thank you for putting these out!!!

  • @iTomlyedz
    @iTomlyedz 11 лет назад

    Hey, love the tutorials, could you explain how to make an 'power-up' appear then disappear after your ship hits it and how to make your power-up only last for a certain amount of time.

  • @producermark11
    @producermark11 11 лет назад

    Thanks for your tutorials ... much appreciated ...
    If I may ... I would like to suggest a tutorial,
    How to touch / swipe the object to get it to move / jump / throw the obj... thanks

  • @Culley743
    @Culley743 12 лет назад

    Thanks Shaun. Happy holidays to you as well.

  • @PurpleDerpy
    @PurpleDerpy 11 лет назад

    I'm following basically the same thing he's doing in these videos but with my own little sprites and backgrounds.
    Right now it's literally a moving grass background with 3 giant trees, and the player is a smaller blue tree that fires tiny green trees.
    It's a very interesting concept.

  • @geniuscrash66
    @geniuscrash66 11 лет назад

    Very good tut! Could I use "alarms" to pause a string of virtual key movements/inputs then press "go" any the player moves?

  • @SP45Gaming
    @SP45Gaming 12 лет назад

    Not sure if I'm saying this right, but set a certain number for the amount of bullets (let's say 5) and then make it so that when it shoots that amount goes down by one. Then, once it's at 0, make it do whatever, reload or something.

  • @bestveigarNA
    @bestveigarNA 10 лет назад +1

    any possible way you can direct me to some help i'm trying to make it where after certain score objects spawn time increases lets say first ten points of the score an object spawns every 30 seconds but after 10 points the objects spawns every 45 seconds.

  • @leeiif
    @leeiif 10 лет назад +3

    can you make this basic playlist only with an rpg

    • @quorthonsinferno5119
      @quorthonsinferno5119 10 лет назад +8

      In these videos, he gives you the tools to create any game you want! This isn't just a tutorial on how to make spaceship games, but how to use gamemaker to make any game you want! It will just take a little thinking out, and you will be all set!

    • @LinkFaroreHylian
      @LinkFaroreHylian 10 лет назад +1

      Premium Fallout There are some things in an RPG that Shaun HASN'T gone over in his tutorials, example health bars, AI enemies, weapon coding, ect. I agree, with lee iff, Shaun should do a RGP tutorial.

  • @ngsteve2173
    @ngsteve2173 9 лет назад

    First of all thanks for these great tutorials! They are thorough and easy to understand!
    I have a question though that really confuses me. When creating 3 instances of bullets and setting the direction, we're like creating the instance first, and then set the direction of the bullets. That to me is confusing because normally I would preset the desired direction first, and then create the instance of the object with that direction. It seems the sequence of how the codes execute is not as straightforward. Can you explain this part a bit more? Thank!

    • @iiiDartsiii
      @iiiDartsiii 6 лет назад

      this is a very late response for you but I'll say it anyways, in any programming language/coding something has to exist first before you apply any changes to it otherwise it wont know what you are talking about. if it was just 1 bullet going in 1 direction then yea you could initialize the direction at the beginning but in this example he's making it so that when you get a powerup you suddenly create 2 extra bullets going in their own unique directions that don't follow the original straight up bullet so you have to set their directions individually.

  • @Vorox17
    @Vorox17 11 лет назад

    In "press A" event add "execute code" action and write: "direction = 180;"
    Then go to your "press B" event and do the same but write: "direction = 0;" instead. I hope that you understand all of this. If you did it right your player should shoot in left direction whenever he is facing left (after you pressed A), and shoot in right direction whenever you are facing right (after you pressed D).

  • @minecraftain1000
    @minecraftain1000 9 лет назад +3

    The reason the direction is counterclockwise starting at straight to the right is due to unfortunate common mathematical tradition. In directional math like physics and calculus degrees are built around making triangles in circles(confusing, I know). One side of the triangle is the closest axis to the angle, another is at the angle, and the last just connects them. So, for example at 0 degrees the first side is the x axis, the second is also at the x axis, and the third doesn't exist. At 30 degrees, the first side is the x axis, the second goes from the origin out at 30 degrees, and since the triangle is in a circle the third side connects the two points where the other sides hit the circle. It is pretty confusing, but this is common procedure so at least it always works the same way.

  • @bigweirdo9947
    @bigweirdo9947 8 лет назад

    The placing of 0 degrees to the right is normal in geometry and engineering. This stems from the X coordinate (the first one in most 2d and 3d coordinate systems, and the only one used in a linear coordinate system) increasing to the right, making that the 'default' direction.
    Both it and the 'inverted' Y coordinates stem from comparing the data to text (because it really is just a long string of 1s and 0s). Just like the default reading direction is from left-to-right, the default angle is from left-to-right. Just like line numbers increase as you move down the sheet, Y coordinates increase as you move down.

  • @laylow822
    @laylow822 11 лет назад

    I saw your tutorials for construct, they're pretty awesome!!!

  • @PhaaxGames
    @PhaaxGames 9 лет назад +3

    I assume the weird angles are due to a focus on platformer games. Running right is direction 0, running left is direction 180. :)

  • @edgarszeikars54
    @edgarszeikars54 8 лет назад

    Sooo i think you can change that to 3 bullets shooting in different directions like shown in the video or shooting 3 bullets in 1 direction by just changing the x coordinate to for example -5 and 5 for the 2 things!

  • @eweeparker
    @eweeparker 10 лет назад

    So, do you think that using time from frame rate is the best practice here? The normal best practice for game creation is to set a generic time(something like time.deltaTime in Unity or a timer function) that is outside of your frame rate so that the varying frame rates between processors can have a consistent behavior.

  • @leeiif
    @leeiif 10 лет назад

    I wrote if (alarm[0] = -1) alarm = 5; in space and instance_create(x,y,shadow_kick_obj); in alarm 0 but it only shoots one bullet

  • @matthewrenna5894
    @matthewrenna5894 11 лет назад

    once assigning a direction you no longer need the " - " symbol in the speed variable. the negative direction tells the game which direction on the x or y coordinates you want to travel. instead of assigning VSPEED = -8, try just setting SPEED = 8. This will allow the object to travel in the DIRECTION you have set first. now for example if you set speed to -8 it will travel OPPOSITE the direction you set

  • @scottlove975
    @scottlove975 12 лет назад

    Shaun,
    When you set an instance to a variable, I notice you didn't declare the variable first... your code compiled, so that must be okay, but can you provide some insight on when to declare a variable and when GM will just infer such when you first set one?

  • @Ticebilla
    @Ticebilla 11 лет назад

    I seem to have encountered a bit of an error. I changed the vspeed =- 8; in the bullet code to speed =- 8; like you said to do after specifying the cone shot directions, but for some reason the right most shot flies directly right, instead of up and right. I have the directions set to 100 & 80,so I'm not sure what went wrong.

  • @leafydragon
    @leafydragon 8 лет назад +3

    Love your tutorials, theyre the only helpful ones for understanding code and not just relying on dumb in-game buttons. TT___TT

  • @virtuoso1505
    @virtuoso1505 8 лет назад +2

    By setting the alarm to 9 any time the space bar is pressed, doesn't this mean there is a delay of 9 frames anytime you stop and then start shooting again?

    • @InviZ.
      @InviZ. 8 лет назад +2

      Yeah. To avoid this, put your bullet create code into the if statement before the alarm[0] = 5;.
      Then delete the code from the timer event, but dont delete the event.

  • @ryarod
    @ryarod 4 года назад

    One thing I need to point out is that, with this method, there seems to be a delay before that first shot is released. I have a hunch that it starts counting down from 5 after any fire-button press, including the first shot.
    I'd welcome introduction to a way to make it so that the first shot emerges on contact of the button press, with subsequent shots following the alarm delay.

  • @nikoregenerator
    @nikoregenerator 8 лет назад +6

    for some reason the alarm doesn't work

  • @SequenceBreak1
    @SequenceBreak1 11 лет назад

    Hey, awesome tutorial, just a quick question. If I wanted to create an "overheat" meter, where firing too many shots would jam the weapon, but cooldown over time, how would I do that and have you already covered something similar to this? Thanks!

  • @abdeshpa
    @abdeshpa 9 лет назад

    This is really good. Thanks for these informative tutorials.

  • @mikemanau
    @mikemanau 10 лет назад +2

    Hey ***** - I noticed that with this method there is a delay when pressing space equal to the alarm counter you set. So if you set it to 20 (1/3 of a second at 60 frames), it's quite noticeable when you press space that it's there. How would you fix this?

    • @sasoferk5775
      @sasoferk5775 10 лет назад

      If anyone else is still wondering the same thing. I used the alarm only as a timer. So all the code goes in the if sentence in the space pressed event. But the alarm still has to be set up as an event (you can put an empty piece of code, becouse it can't be blank).

    • @sarahazr8869
      @sarahazr8869 5 лет назад

      if(alarm[0] = -1){
      create_instance(x, y-16, obj_bullet);
      alarm[0] = 5;
      }

  • @SminkyGET
    @SminkyGET 12 лет назад

    Still fantastic, i would also appriciate if you coverd the how ot use the game maker actions such as the Alarms etc.. along with just the scripts. As they can be more flexible when you want to do more complex things with them down the line (and don't know the code to do so). But otherwise fantastic.

  • @WhyShouldYouCare989
    @WhyShouldYouCare989 12 лет назад

    Thanks for these videos man, never thought making games would be interesting but i got a nice game set up from your videos, theres no point to it yet but its kinda like astroids from atari

  • @salessales1410
    @salessales1410 8 лет назад

    could anybody be nice and please explain why on 13:00 he changed it from vspeed =-8; to speed=8? why did he remove the - sign? Thanks!

    • @moondoll2546
      @moondoll2546 8 лет назад +3

      The negative sign was to make the bullet travel straight up but since he gave each bullet a specific direction (or angle), the negative sign wasn't necessary anymore.

    • @metalman895
      @metalman895 8 лет назад

      I missed him setting bullet1 to 90, so my speed was 8 but the direction was still set to 0. My angled bullets were going perfect, and the main bullet was shooting straight to the right.

  • @MaximillianRed
    @MaximillianRed 7 лет назад

    Can you make a tutorial for a player fire power up where you start shooting spread shots and homing missles using drag and drop.

  • @srkeego1148
    @srkeego1148 9 лет назад +2

    when I do if (alarm [0] = -1) it works fine
    but when I add an alarm and do if (alarm [1] = -1) it does not work
    instead it does what alarm[0] is supposed to do
    help

    • @keeganreck9754
      @keeganreck9754 9 лет назад

      Same here

    • @uglytunes4112
      @uglytunes4112 9 лет назад

      SR Keego you are supposed to do
      (alarm[0] = -1)
      not
      (alarm[1] = -1)
      hoped this helped

    • @sarahazr8869
      @sarahazr8869 5 лет назад

      not sure here but I think you should first use the alarm[0], and then if you're using it but you need another alarm you use alarm[1]

  • @aimanacap
    @aimanacap 10 лет назад

    In my country,we are teach that the direction angles go counter-clockwise from the right like in the video. So it will only be weird if it goes the other way around for me.

  • @Fabixlol
    @Fabixlol 11 лет назад

    I have a question, i have a top down shooter but with 4 directional shooting so i really dont know how to make this "infinite string" of bullets.
    I wonder if you could explain it in the step event like you mentioned in the vid.
    Thank you for your videos!

  • @TylerYoungpizzaisdabest
    @TylerYoungpizzaisdabest 11 лет назад

    Hey, thanks for the tutorials. Is there a way to have a button press combo do a certain animation. for example ASDF does a special move and hurts a enemy more

  • @danielgreenhead9838
    @danielgreenhead9838 10 лет назад

    There is an odd side-effect of this code. When I release the button pressed projectiles continue to stream out for a very short time, depending upon the alarm value. How can I 'tighten' up this code; meaning that when the button is released projectiles stop firing instantly. Here is the code I used:
    if (keyboard_check(vk_up)) if (alarm[0] = -1) alarm [0] = 5;

  • @thedankachu8653
    @thedankachu8653 9 лет назад +1

    When you put a delay between each bullet, the bullet apears only (for example) 5 frames after you press the command. Is there a way to make the bullets apear as soon as you press space bar?

    • @thedankachu8653
      @thedankachu8653 9 лет назад +1

      Or a way to put a bullet limit that can be on screen.

    • @alansosa2180
      @alansosa2180 9 лет назад

      +Jerr Cyr You can watch the last episode about this, he mentions it there

    • @thedankachu8653
      @thedankachu8653 9 лет назад

      Thanks Alan Alvarado

  • @40kfanatics
    @40kfanatics 10 лет назад

    How would I go about making a power up that once taken gives you the ability to shoot 3 bullets?

  • @ricksanchez7058
    @ricksanchez7058 6 лет назад

    when I pressed the up and left arrows (to move diagonally) and tried to shoot at the same time, i wasn't able to shoot.
    And when I started to shoot by holding the space bar, I wasn't able to move diagonally by pressing the left and up arrows.
    is there any explanation for this?
    PS: i had no problems trying to move diagonally using the up and right arrows while shooting, but for some reason I can't do it to the left.

  • @logangraham6943
    @logangraham6943 8 лет назад +1

    I'm having an issue here. I followed the instructions, only making the minor changes appropriate for my game. One such change is the ship having multiple weapons. But when I set the different weapon functions to the alarm none of them work anymore. The ship simply won't fire any of them. The only way I can have all my weapons is by having it fire only when the button is pressed. Is there another method to firing a stream without alarms?

    • @linkdeous3928
      @linkdeous3928 8 лет назад

      You should try to create one alarm for each weapon, with a var that say wich weapon will fire . then, each alarm trigger if you selected the right weapon ?

    • @logangraham6943
      @logangraham6943 8 лет назад

      Yeah that didn't pan out either. The same results as before actually. Thanks anyways.

    • @linkdeous3928
      @linkdeous3928 8 лет назад

      Arf, my bad, sorry then, maybe if you give me the code i can help you ?

    • @logangraham6943
      @logangraham6943 8 лет назад

      Eh, it's okay. After the issues I was having and my partner on the project passing away. I had the whole game structured differently to compensate. It happens.

    • @linkdeous3928
      @linkdeous3928 8 лет назад

      I saw, good luck then :)

  • @TheRadMaker
    @TheRadMaker 12 лет назад

    This is a good way to shoot, but I don't want an initial delay when the first bullet is shot. Do you know to fix this?

  • @sodacatTV
    @sodacatTV 9 лет назад

    gamemaker direction constants follow a unit circle, that makes 0 degrees directly right in the x direction

  • @TheGlassDoorBand
    @TheGlassDoorBand 11 лет назад

    im trying to use the alarm method to create enemy random generator, how would you go about creating an enemy random generator?

  • @Ahjiiin
    @Ahjiiin 7 лет назад

    hi there, I am having a problem were my instance_create is not a code apart of the software, but a variable I have created myself is there a fix for this, please help

  • @poker158149
    @poker158149 11 лет назад

    The angle system is based on how circles and angles are actually used in Trigonometry and general math. Regardless, awesome tutorials!

  • @EverScrolls
    @EverScrolls 10 лет назад

    If you don't set the vspeed to speed and switch the number to positive, the game engine does the exact same thing, am I missing something?

  • @snady83
    @snady83 12 лет назад

    I ran into the issue that if I hit 2 directions at the same time such as up and right, down and right, and down and left I can fire the beams. However, if I hold up and left (diagonal) and hit the space button it will not let me fire. Besides this one issue everything works, Any suggestions on why it might be doing this?

  • @jc_dogen
    @jc_dogen 8 лет назад

    Hey, does anyone know a way to start each shot at a different animation frame? Like, if the animation has 4 frames, shot 1 starts on frame 1, then frame 2, then 3, etc.
    I tried setting the image index of the shot on it's creation to a value based on how many time i've shot, but that doesn't seem to work. Is there another variable/property that I should use?

  • @Dzejk86
    @Dzejk86 6 лет назад

    Thanks a bunch, got confused by how the alarms work, now I know, thank you!

  • @jakobgorodetsky3748
    @jakobgorodetsky3748 11 лет назад

    When I do my voding, x+=2 p to stop my charecter from moving, when I am not holding any key, it says it can't work. Why?

  • @Mr.Joehar
    @Mr.Joehar 11 лет назад

    hi , i set the airplane to be able to fire at any direction as i rotate the airplane but the only problem is when i start the game it fires at the right direction .how can i set it to start fire at the upper direction first.

  • @deificGashsaucer
    @deificGashsaucer 10 лет назад

    Regarding about the bullet1.directions...just base your measurements of the angles on a protractor. 0 would be straight right.

  • @Nicoyutub
    @Nicoyutub 12 лет назад

    hey, i'm just starting to watch these.
    i want to make a game with movement and combat like A link to the past. will i be able to learn that with your tutorials?
    keep up the good work :D

  • @multisoundwave1
    @multisoundwave1 11 лет назад

    how would i make it were it goes forward for a certain distance?

  • @42AlienRobot
    @42AlienRobot 11 лет назад

    Why does a sound effect (explosion) cut the background music?

  • @magnarokk4256
    @magnarokk4256 9 лет назад

    I'd just like to point out that game maker actually had a good idea when making the angle system so "weird", because the way they made it is the way that angles in radians are measured (from right, counterclockwise), so the system would help alot with trigonometric calculations

  • @PTSDSquirrel
    @PTSDSquirrel 12 лет назад

    so i have a question?
    In regards to speed caps can they be set to relative positions, ie. when pressing the up key the speed cap is if (Speed > 2, and down, Speed > 6?
    i am trying to create the illusion of drag and physics with out actually programming physics.

  • @Secnateb
    @Secnateb 11 лет назад

    I'm trying to adjust this for a platformer. I can get the bullet to appear on the right spot when facing right, but when facing left the bullet appears as if facing right (it travels left, just appears behind the player). I was using drag and drop features to set bullet speed and direction, but I'd rather do it in code. Anyone have any suggestions?

  • @NitronNinja
    @NitronNinja 12 лет назад

    Quick question. I want a bullet object to check the image_xscale of the object_player, so I an tell it which way to go (left or right, the game is a platformer). Is there a way to do this and what is the code to check another object's variable?

  • @jonast96
    @jonast96 10 лет назад +1

    Since there are so many smart people around here, im trying to make a shooter where i can shoot both ways. By using the horizontal speed i can get the bullet to go left and right but if i stand still it will not have a speed at all (since hsp = 0 ). What can i do to make it go my last looked way. So f.ex if i look left and sprite is left and im standing still, how can i get it to shoot towards the left?

    • @LinkFaroreHylian
      @LinkFaroreHylian 10 лет назад

      wow your comment has gone an entire month without a reply, I'm having a similar issue so if someone could help that would be great.

    • @psbpaladin
      @psbpaladin 10 лет назад

      LOZMV
      I had a similar problem a while back. I think how I solved it was by creating a new variable: last_direction. In the Step event, last_direction would become 0 if hspeed was 0. If hspeed was 0, last_direction wouldn't change. You can then have a bullet go left if last_direction is 0 and right if last_direction is 1. I hope that helps!

    • @jonast96
      @jonast96 10 лет назад

      LOZMV Hello, i actually did get an answer from Shaun on another video. He said: Make another variable to track which direction you're currently facing. Set it to 1 when your hsp is positive and set it to -1 when your hsp is negative. Initialize it as whichever direction your sprite faces by default. Then when you make your bullet multiply its speed by this variable to get it to go the right way.
      I replied with :
      Ok, i see what you are getting at. I assume that the If function is not the choice i want here.. My code is (in the step function):
      //direction
      if(hsp > 0){
      dirplayer = 1;
      image_xscale = dirplayer;
      }
      if(hsp < 0){
      dirplayer = -1;
      image_xscale = dirplayer;
      }
      //Shooting
      //shooting if not invulnerable
      if(invulnerable != 1){
      if (key_shoot){
      sprite_index = spr_playershoot;
      image_speed = 0.25 * dirplayer;
      instance_create(x,y+4,obj_playerbullet);
      alarm[0] = 15;
      }
      }
      Dirplayer is a variable defined in the create player event with a value of 1. (since the character starts by looking right).
      As mentioned above it probably has to do with if(hsp < 0) and if (hsp >0), since hsp is 0 it doesn't know what to do and all i would need is a set command? if one even exists.
      Did not get an answer for this, so i never got it to work... This is bevause when hsp = 0, it does not know what to set the Dirplayer as, it assumes it is just in standard position, so if you fix that, you would probably be good to go.

    • @anniedawg6174
      @anniedawg6174 9 лет назад

      +Jonas “Sir” Thoresen
      I had some success with left-right facing and shooting in my test, though i didn't follow so closely.
      A handy code is "sign". Here in obj_player's step event, it returns -1 or 1 depending if hspeed is negative or positive:
      if hspeed != 0
      {
      image_xscale = sign(hspeed);
      }
      and in my bullet's create event (sends bullet in direction based on player's image_xscale):
      hspeed = obj_player.image_xscale * 7;
      (7 is the variable bullet speed)
      maybe that helps someone out there lol.

    • @Possi_ball
      @Possi_ball 8 лет назад

      +Haywood Jablome
      It actually helped a lot, thanks!!

  • @Maltebyte2
    @Maltebyte2 11 лет назад

    how can i say when guys looks left bullet left is shot when pressing space and right bullet is shot when guy looks to the right? many thanks!!!

  • @Maltebyte2
    @Maltebyte2 11 лет назад

    got it to work now :) do you know how to do the following >
    if (sprite_index == spr_man_right_idle) {
    if (keyboard_check_pressed(ord('F')))
    sprite_index = spr_right_fire;
    }
    i want to only show this sprite_index for 1 second or less? thanks!!

  • @twobitbros.7004
    @twobitbros.7004 11 лет назад

    how do i make my characters projectiles follow my mouse's direction?

  • @Hypaslap
    @Hypaslap 12 лет назад

    Hi, i don't know if its the way i did my game, but, how do you get your character to be able to move around 360? at the minute I'm restricted to up down left and right, but if i was to press the up and left button, it doesn't travel diagonally to the top left corner..? Great tuts!

  • @themindmapstore4979
    @themindmapstore4979 6 лет назад

    an actual thought that ran though my head when seeing this for the first time:
    "that's odd why's this labled in the Education catogory this is about learning things not about schools... ... Ooo"
    yer it may be that the "education" system in my area isn't entirly fit for purpose.
    And with the realisation Shaun is doing a better job than the IT department of my (quite expensive) school i'm off to Patrion.

  • @SharpData
    @SharpData 11 лет назад

    I guess it uses the "Unit Circle" as a way to calculate gradients, where for instance 90 degrees would be equal to PI/2, 180 degrees to PI, and so forth.