GameMaker Studio 2: Let's Create a Moving Platform

Поділитися
Вставка
  • Опубліковано 29 січ 2025

КОМЕНТАРІ • 24

  • @itscookie159
    @itscookie159 2 роки тому +1

    hello, my code has a problem, so when i start the game
    the moving platforms does work, but it kinda dont get out of its place on the first trys, i have a button to reset the room i am in, and when i reset it like 3 times it works how its supposed to work
    can you help me?

  • @Dlong19777
    @Dlong19777 3 роки тому +2

    Would love to see how to implement this on a top down moving platform.

  • @6Nicolas
    @6Nicolas 6 років тому +1

    great lesson, thank you ! the movement is really smooth here.

  • @SnowstormProductionsCompany
    @SnowstormProductionsCompany 2 роки тому

    ok- so im making a platformer game with TWO players- and when i use this tutorial i think because there is two players instead of one it screws with the platform and makes it stay in one area kinda glitchy, do you think you could help me?

  • @ChrisDoesTV
    @ChrisDoesTV 4 роки тому

    Please can you go over collision elements you mentioned at the start of the video

  • @Trigunner98
    @Trigunner98 5 років тому +2

    This is a really polished tutorial, but I couldn't get the platforms to move even a little at 3:41.

  • @mileselectric3677
    @mileselectric3677 4 роки тому

    The problem im having with this is that ive copied word for word your code and it doesnt carry the player at all

  • @rebeccagerman3364
    @rebeccagerman3364 4 роки тому

    mine just stays in the same place and glitches :( i followed the code exactly too

  • @hunt2315
    @hunt2315 3 роки тому

    I completed the tutorial, and it worked great for the platforms, but I couldn't figure out how to make it so you could move left and right on the platform

  • @dreamyhydra9002
    @dreamyhydra9002 4 роки тому

    you can also do this by making these events for the moving platform object
    create:
    movesp = 4;
    step:
    if (place_meeting(x+1,y,obj_floor))
    {
    movesp = movesp * -1;
    }
    if (place_meeting(x-1,y,obj_floor))
    {
    movesp = movesp * -1;
    }
    x = x + movesp

    • @backstagy529
      @backstagy529 4 роки тому

      For me it just made the object invisible/

  • @SuicideSauceNoodles
    @SuicideSauceNoodles 6 років тому +1

    Mine just glitch

  • @jameswebling3794
    @jameswebling3794 6 років тому +1

    This is a delicious piece of code. Thank you so much for sharing. It works really well for the best part. I am having a couple of problems though. When my character lands on it, he is stuck in the jump animation. Also, if the platform hits my character from the side, he gets stuck in it. Any help would be greatly appreciated.

    • @GameMakerCasts
      @GameMakerCasts  6 років тому

      I do not know why your player isn't switching back animations without seeing what is actually happening. As for getting stuck inside of the platforms I made a video that is uploading right now and will be available tomorrow that talks about that issue and how to fix it (along with better player movement on the platform itself).

  • @MohAmuza
    @MohAmuza 4 роки тому

    going down at the end, you teleported the player that's why its not smooth fall

  • @Aveskarina
    @Aveskarina 6 років тому

    Hello people. This way to make moving platforms worked for me about 50:50.
    I wasn't able to reproduce platforms "carrying effect". Platforms just still slides under player. My code looks almost identical but it looks like "var instance = instance_place(x,y+1,oMovingPlatform);" is not set.
    Nothing after "if(instance !=noone)" is executed.
    Ill post rest of the code, so if anybody can read anything of it, iwould like to hear. Even sugestions what to look for will help. Thanks in advance.
    //---------------------------------------------------------------
    //Vertical Collision Platform
    //---------------------------------------------------------------
    if (place_meeting(x,y+vsp,oMovingPlatform))
    {
    while (!place_meeting(x,y+sign(vsp),oMovingPlatform))
    {
    y = y + sign(vsp);
    }
    vsp = 0;

    var instance = instance_place(x,y+1,oMovingPlatform);
    if(instance != noone)
    {
    is_on_platform = true;
    hsp = instance.hsp * instance.dir;

    }
    else
    {
    is_on_platform = false;
    }
    }

    • @PPNyanMain
      @PPNyanMain 6 років тому

      your code is very similar to mine, and since this was from 4 months ago, maybe you solved the issue by now and can help me out?

  • @elalegreroger
    @elalegreroger 4 роки тому

    two words: "Shawn Spalding".

  • @nathanhill3388
    @nathanhill3388 6 років тому +2

    WOULD BE BETTER IF PUT CODE IN DESCRIPTION :(

    • @BenjiBeenFly
      @BenjiBeenFly 5 років тому +4

      But then you just copy and paste and dont know what you’re actually doing .. lol

    • @gamer-sama7769
      @gamer-sama7769 4 роки тому

      @@BenjiBeenFly That's true, but it still makes it better for reference against typos.