Homing Rocket in 2 lines [Game Maker | Basics]

Поділитися
Вставка
  • Опубліковано 17 жов 2024

КОМЕНТАРІ • 44

  • @Phodis
    @Phodis Рік тому +7

    OMG!!!, I just discovered this channel. I LOVE GML!!.. wish I had have found this earlier.
    Made my day, thank you sir.

    • @1upIndie
      @1upIndie  Рік тому +2

      Glad to hear you enjoy the content/engine. No need to be formal, we are all indie developers and on equal fooding.

  • @YELLOWZhang
    @YELLOWZhang Рік тому +1

    这个正是我需要的,虽然我已经解决了这个问题。但是看了你的实现,我也有收获。

    • @1upIndie
      @1upIndie  Рік тому +1

      我很高兴您自己解决了这个问题,并且我仍然能够为您提供一些帮助。

  • @1upIndie
    @1upIndie  Рік тому +4

    /// code of the spawner/player Step Event:
    // check for any input
    var actionButton = keyboard_check_released(vk_space);
    // if any input is there, spawn a rocket
    if (actionButton == 1){

    // spawn a rocket and give it an inital direction, angle and speed
    var rocket = instance_create_layer(x - 80, y - 95, "Instances", obj_Rocket_Vanilla);
    rocket.direction = 180-35;
    rocket.image_angle = 180-35;
    rocket.speed = 3;

    }
    ////// code for the rocket Step event:

    direction += 1.2 * sign( angle_difference( point_direction(x,y,obj_Enemy.x, obj_Enemy.y), direction));
    image_angle = direction;
    /////// code for the rocket Collision with the target/enemy:
    // create explosion on impact
    instance_create_layer( x,y, "Instances_Effects", obj_Explosion);
    // destroy self
    instance_destroy();
    // destroy the enemy/target
    instance_destroy(other.id);

  • @tutata
    @tutata Рік тому +1

    Very cool tut!

    • @1upIndie
      @1upIndie  Рік тому

      Thanks mate! 2nd part incoming this week.

  • @tylermaccallum3529
    @tylermaccallum3529 Рік тому +3

    don't forget part 2! :P

    • @1upIndie
      @1upIndie  Рік тому +1

      I am not, it is incoming, I am just currently fixated on things that need my undevided attention.

  • @willm127
    @willm127 Рік тому +1

    Very cool! Will await for part 2

    • @1upIndie
      @1upIndie  Рік тому +1

      Imcoming, but there are other videos in the pipeline which need to be done before this one.

  • @smokeback
    @smokeback Рік тому +1

    this is amazing

  • @meganoob9281
    @meganoob9281 Рік тому +1

    Nice video 1up.

    • @1upIndie
      @1upIndie  Рік тому +1

      Thanks for watching!

  • @vosovoso5220
    @vosovoso5220 Рік тому +1

    amazing!

  • @SeelenPixel
    @SeelenPixel 9 місяців тому +2

    A very easy and efficient solution, thank you!

    • @1upIndie
      @1upIndie  9 місяців тому +1

      You are more then welcome!

  • @andro-
    @andro- Рік тому +1

    dude, i love you

  • @Layazeroda
    @Layazeroda 7 місяців тому +1

    How can I do this but have the missile keep going forward in one direction if it misses the target? I basically want only the missile's y coordinate to follow the target's y, while the x moves forward based on hspeed.
    That way if it misses it keeps going in one direction. Every single "follow" function uses both the x and y, so I can't figure out how to adjust them to only follow one of either.
    Thanks in advance, you seriously have the quickest and easiest tutorials around!

    • @1upIndie
      @1upIndie  7 місяців тому

      You mean a limited lock on for one target and once it misses if flyes away?

    • @Layazeroda
      @Layazeroda 7 місяців тому

      Basically yes@@1upIndie

  • @tylermaccallum3529
    @tylermaccallum3529 Рік тому +1

    Amazing, what program are you using for this tutorial though?

    • @tylermaccallum3529
      @tylermaccallum3529 Рік тому

      by that I mean , is it an odlre version of game maker.. ? your art features look way better then what i have lmao

    • @DrJurdenPeterbergsteinlerwitz
      @DrJurdenPeterbergsteinlerwitz Рік тому

      @@tylermaccallum3529 It's GMS2 and it tells you the version top right on his screen.

    • @tylermaccallum3529
      @tylermaccallum3529 Рік тому

      @@DrJurdenPeterbergsteinlerwitz I know it's game maker, although the functions he has seem completely different than my own, I have GM 2.3.4 , is this game maker studio?, how do they differ?

    • @tylermaccallum3529
      @tylermaccallum3529 Рік тому

      @@DrJurdenPeterbergsteinlerwitz oh no sorry man, I meant at 3;40 when the program switches

    • @DrJurdenPeterbergsteinlerwitz
      @DrJurdenPeterbergsteinlerwitz Рік тому +1

      @@tylermaccallum3529 Oh, well... I didn't even realize he switched programs! It looks almost identical to Photoshop, except for the icon/logo.
      As for GM / GMS I am pretty sure they're the same. I've actually never heard of just GM. It's always been GMS for me. For his functions: 1upIndie often uses his own custom made functions/scripts. However, I didn't see any custom functions in this video. Which function are you talking about?

  • @CoffeeAI201
    @CoffeeAI201 Рік тому +1

    Hey 1up, can you make a tutorial on how to make the new move_and_collide function work with a tile layer and tile map created by code instead of in the room editor?

    • @1upIndie
      @1upIndie  Рік тому

      Hm, you mean for random/premade generation? That topic can be a simple 2 min to hours of video content.

    • @CoffeeAI201
      @CoffeeAI201 Рік тому

      @@1upIndiehaha yeah

  • @TheNumber01
    @TheNumber01 Рік тому +1

    i love you

  • @ednaldojunior9975
    @ednaldojunior9975 Рік тому +1

    maravilhoso

  • @insertusernamehere8125
    @insertusernamehere8125 7 місяців тому +1

    reminds me of metal slug

    • @1upIndie
      @1upIndie  7 місяців тому

      Are you crawling through my entire video catalog? Hope you find there what you are looking for (and thanks a lot for the trust in subbing).

    • @insertusernamehere8125
      @insertusernamehere8125 7 місяців тому

      @@1upIndie yes I am going through your vids for fun since you make cool stuff

  • @mrnobody7600
    @mrnobody7600 Рік тому +3

    Having ptsd from gta online rn

    • @1upIndie
      @1upIndie  Рік тому

      Hu? Not sure what you mean to be honest, please elaborate if you can.

    • @mrnobody7600
      @mrnobody7600 Рік тому +1

      @@1upIndie bro have you never played gta online? The moment you step into a public lobby you get targeted by a homing missile lol.

    • @1upIndie
      @1upIndie  Рік тому +1

      That sounds like fun from the guy shooting the missile, not so sure about the receiver though.
      I never actually played Gta online or the last iteration. Dunno, Rockstar games are not my cup of tea. I can't get into those games... The last one was Vice city and I only did stunts or go on a rampage and then quit out of boredom@@mrnobody7600

  • @Axel-vu2hw
    @Axel-vu2hw Рік тому +1

    "Promo sm" 🤭