Player collision and state reset [#5 Remake Undertale in GameMaker ]

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

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

  • @heartbae87
    @heartbae87 9 месяцев назад +5

    Finally an undertale tutorial that actually teaches battle coding

    • @1upIndie
      @1upIndie  9 месяцев назад +1

      Glad you found what you are looking for.

  • @thegreenshilltophomesteadg7006
    @thegreenshilltophomesteadg7006 9 месяцев назад +4

    Love ya man! Keep up the work :)

    • @1upIndie
      @1upIndie  9 месяцев назад

      Thanks for watching!

  • @1upIndie
    @1upIndie  9 месяцев назад +2

    Videos code:
    Create event:
    hitTime = round(1.8 * 60);
    hitTimer = hitTime;
    Step event:
    // time total for being hit/invulnerable
    hitTimer--;
    if(hitTimer < 0){
    hitTimer = hitTime;
    hitBlinkTimer = hitBlinkTime;
    image_alpha = 1;
    state = "idle";
    }
    #region collisions
    var collInstance = collision_rectangle(bbox_left,bbox_top,bbox_right,bbox_bottom, obj_Enemy_Bullet_Parent, 0,0);

    if(collInstance != noone and state == "idle"){
    state = "hit";
    }

    #endregion

  • @AidinZolghadr
    @AidinZolghadr 9 месяцев назад +2

    What are your thoughts on the newly introduced "move_and_collide()"? Does it fully replace old collision detection method with place_meeting() in your opinion?

    • @1upIndie
      @1upIndie  9 месяцев назад +2

      It is one of the best additions to the engine. It pretty much reduces tons of code for all directions and you can use it for tilesets and instance collisions. I personally love it. Will is replace all collision codes? Nah, there are still things you need to do manually, but for basics topdown movement or a platformer it is a god send (so here, yes it replaces it and makes it more convenient).

    • @AidinZolghadr
      @AidinZolghadr 9 месяцев назад

      @@1upIndieThanks, are there any use cases in a platformer that it won't support fully?

  • @onebitterbit
    @onebitterbit 9 месяцев назад +1

    Thanks for the tutorial! another lesson!!

    • @1upIndie
      @1upIndie  9 месяцев назад

      Ya welcome!

  • @eunit08
    @eunit08 9 месяцев назад +1

    Can't wait for the next tutorial 😢