GameMaker Studio 2 - How To Transition Rooms Beginner Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ม.ค. 2025

ความคิดเห็น • 417

  • @hyprincess3376
    @hyprincess3376 ปีที่แล้ว +13

    This tutorial was super helpful, but my player isn’t going to the X and Y points I put in the creation code when they warp, they just change Roos and stay in the same spot

  • @slickygreasegames
    @slickygreasegames 3 ปีที่แล้ว +20

    I just tried out this tutorial. Very simple and straight to the point. Loved how you explained every detail, this really helped on my project. :)

  • @mathewnyonyony7855
    @mathewnyonyony7855 ปีที่แล้ว +1

    What a well explained tutorial! I took my time and watched it until the end. I have started to develop my game by following these wonderful steps and am really motivated and enjoying my progress as well. Kindly I would love to watch more tutorials and please continue to provide more for many to benefits. Thank you so much cheers buddy.

  • @Omar-vp1cf
    @Omar-vp1cf 6 ปีที่แล้ว +3

    Dude awesome video! I’m working on a jam right now and this video answered all my questions!

  • @MaknaEXMachina
    @MaknaEXMachina 4 ปีที่แล้ว +2

    Dude, thanks for this video. This is a really cool way to do it, I'll use this tomorrow.

  • @DarkFrostMoe
    @DarkFrostMoe 5 ปีที่แล้ว +2

    Thank you very much, you helped me in a problem where I needed help, very good video bro, keep it up.

  • @Manakeksi
    @Manakeksi 2 ปีที่แล้ว

    Danke!

  • @johnjohnson2516
    @johnjohnson2516 2 ปีที่แล้ว +3

    im having an issue .. ive followed what was shown and so far everything works, except for the coordinates
    the problem im having is that my character can teleport to the next room, but they will not teleport to the coordinates meant for it to spawn at, but rather spawn in the exact coordinates as it came in. im using the newest version of game maker i believe, and im still new at learning how the engine works, any help works!

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  2 ปีที่แล้ว +1

      You must stop the ability to move once you begin to warp, otherwise your player will execute their last movement code, something like x += 5, and it will warp back to its previous x.
      At least that’s probably what it is.

    • @johnjohnson2516
      @johnjohnson2516 2 ปีที่แล้ว +1

      2 things
      1: THANK YOU! for actually responding to me about the problem! means a lot to me,
      and 2: now that i think about that, that actually does make sense, ill look into it more and see if theres something i could write up to pause the player's input for a sec while warping, once again thank you!

    • @johnjohnson2516
      @johnjohnson2516 2 ปีที่แล้ว +5

      i think i figured it out lol
      turns out if your player is set to solid from the little tick Box, it breaks the whole process, but if you don't tick solid, it works perfectly fine! once again thank you so much!

    • @SoulStoneGames
      @SoulStoneGames ปีที่แล้ว +1

      @@johnjohnson2516 thank god for this comment i was going crazy thinking i mistyped something xD

  • @frostwolf5499
    @frostwolf5499 ปีที่แล้ว +2

    muchas gracias por este tutorial, justamente necesitaba un objeto que llevara al jugador a otro nivel, simple, funcional y efectivo, GRACIAS :D

  • @lucyvasser2605
    @lucyvasser2605 6 หลายเดือนก่อน +2

    i followed this exactly but im having this issue where it wont change the x and y value of the player object at all, only switching to the next room with no change in the player objects location

    • @VibingMonkee
      @VibingMonkee 5 หลายเดือนก่อน

      I had the same problem and apparently it doesn't teleport the player if solid is on

  • @theprehistoricnerd
    @theprehistoricnerd 8 หลายเดือนก่อน +1

    Hey! great tutorial andf it working for me! but im having an issue where when i hit the warp it brings me to the next room but the target x and target y variables dont work.could you help?

  • @favor1791
    @favor1791 2 ปีที่แล้ว +1

    Is it possible to place the warp off screen so when the player walks off screen, that’s when they appear in the next hall way?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  2 ปีที่แล้ว +1

      Yeah. Objects off screen will still run their code and detect collisions.

    • @favor1791
      @favor1791 2 ปีที่แล้ว +1

      @@LetsLearnThisTogether thanks!

  • @ArtsieFrog
    @ArtsieFrog ปีที่แล้ว +1

    Thank you.
    I want to make a Zelda clone and I was stressing about this door to room thing.
    Wish Zelda classic was more robust.

  • @misorashi3368
    @misorashi3368 5 ปีที่แล้ว +36

    My boy has the League of Legends client in the background lmao what a legend

  • @taavitimm9045
    @taavitimm9045 ปีที่แล้ว

    this was helpful, thank you. I was trying to figure this out on my own and it was quite a mess. I had like 10 different door objects and for each new door i tried to make a new door object... but it didn't work that well. This is better.

  • @Piriper267
    @Piriper267 8 หลายเดือนก่อน +1

    I used this tutorial in two of my projects and it cames out that it works but targetX and targetY are working strange and I don't know how to fix it; the player will be teleported in total different side of the room from the x and y I've setted. I also tried to cange the X and The Y slowly to reach a position that would work for me but it doesn't move

    • @VibingMonkee
      @VibingMonkee 5 หลายเดือนก่อน

      I had the same problem and apparently it doesn't teleport the player if solid is on

  • @charlielol2580
    @charlielol2580 5 ปีที่แล้ว +2

    I have literally copy and pasted the variable names from my create event to my player collision event and it still says in my create event that the variables are only being referenced once. Please help.

    • @finnradner3293
      @finnradner3293 5 ปีที่แล้ว +1

      Yeah, I'm having the same issue. I'll reply if I figure out the fix. Do u have any ideas?

  • @dircreate46
    @dircreate46 2 ปีที่แล้ว +1

    "I am not an artist" made me laugh weirdly enough, really helpful tutorial though 👍

  • @crashedbruh
    @crashedbruh 5 ปีที่แล้ว +1

    man that was a really helpful video.
    one thing though. u do not need two separate sprites for the left or right. i had actually faced this problem first. but after some trial and error,i wrote a code which successfully flipped my character just like yours does without two sprites.😃

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว +2

      It is true, it's not necessary if the Sprite looks the same left and right, like here. However, if the character had a weapon on one side or something else was different on one side, you would want different sprites for left and right.

  • @leciojoaoorsiribeiro4135
    @leciojoaoorsiribeiro4135 4 ปีที่แล้ว +1

    Man, you just saved my night

  • @mikeregular2893
    @mikeregular2893 3 ปีที่แล้ว +1

    can you help me. my warp warps me to the room I want, but it warps me to the coordinates that I entered the warp.

    • @EndriwDJ
      @EndriwDJ 3 ปีที่แล้ว

      with me too lol, is this something of the new gamemaker versions?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว

      Check out my updated version of this video for common errors and bugs, like this one that I breakdown.

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว +1

      It's not an issue with new versions. Check out my updated video. If you're still having issues, you can email me your project.

  • @gilgamesh4795
    @gilgamesh4795 4 ปีที่แล้ว +1

    This video helped me a lot, Thanks.

  • @orachok
    @orachok 3 ปีที่แล้ว +1

    IT'S SO HELPFUL OMG THANK YOU

  • @yoapolloboy
    @yoapolloboy 5 ปีที่แล้ว +1

    i know this video is a little bit old but, i have a problem when i put my player in persistent mode, i cant use restart_room(); how i can fix that ? i'm making a platform game so i need the restart room for when the player falls in the void he can go back in the start of the room

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว

      Why can't you use restart room? What happens? What doesn't happen?

    • @yoapolloboy
      @yoapolloboy 5 ปีที่แล้ว

      @@LetsLearnThisTogether my player just falls and stay falling, he don't restart the room, i'm using a object with collision with restart room, but when i use Persistent in player my character stay falling but when i'm not using, the room resets normally

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว

      I suppose that makes sense. Because it's persistent it wouldn't change with that function.
      You'll need to manually reset the player then, by moving their x and y to the start location at the same time you call room_restart.

  • @Saioren
    @Saioren 4 ปีที่แล้ว +1

    Hey so my character wont appear in the other room unless I make a second character in room 2 but then i cant go back and forth into the rooms freely without my character glitching into the ground. sup with that

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว +1

      Is your character set to be persistent? If not, they won’t move between rooms.

  • @netowgtz
    @netowgtz 5 ปีที่แล้ว +1

    as a beginner, i can tell your videos are very helpful! mayb i have an idea for a video perhaps when u run out of ideas lol, im trying to make a popup menu that displays other menus in it (like saving or items, etc.) but i have problems controlling their indexs when all of them are running, just a derp idea lol, peace

  • @kyxor7618
    @kyxor7618 3 ปีที่แล้ว +1

    It doesn't work in july of 2021, i go to warp, and it takes me at the exact same coordinated i am, just at the next room. How can i fix it?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว

      The code for GML hasn’t changed, so it will still work now. Double check where you’re going, and that you’re not landing on the other warp to return yourself to the first room

    • @kyxor7618
      @kyxor7618 3 ปีที่แล้ว +1

      @@LetsLearnThisTogether I manage to make it work by unchecking the ''solid'' mark on my player sprite object. Thanks for the reply tho! I'll make sure to check more of your videos since you reply to the videos no matter how old they are! ^.^

  • @siriuslemaitre4833
    @siriuslemaitre4833 3 ปีที่แล้ว +1

    I have a weird problem : when I write code in the instance creation code, I cant save it, so the variables targetX and targetY arent referenced

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว

      Not being able to save sounds like a bug. Try closing and reopening GameMaker. If that doesn’t work, try saving your project after doing anything else. If that still fails uninstall and reinstall.

  • @NJ4KTV
    @NJ4KTV 7 ปีที่แล้ว +5

    The tutorial worked... but for some reason exactly the same is not working in my main game. Can I send you the file to look at?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  7 ปีที่แล้ว

      +NJ4K Sure. Email it to me at beyondusgames@gmail.com. Export it from within the game and send it my way

    • @NJ4KTV
      @NJ4KTV 7 ปีที่แล้ว

      Thankyou

  • @ducked-head5797
    @ducked-head5797 5 ปีที่แล้ว +4

    ı made my character persisdent when I get ın a room it works with no pronlem but when ı exit ı disappear

  • @sadiejoh.6202
    @sadiejoh.6202 4 ปีที่แล้ว +2

    Thank you so much for your tutorials. Quick question though,
    my first warp works completely smooth and fine, but when she tries to go back, she cant walk up to the warp, it's like something is blocking her just a block or so away from the warp

    • @sadiejoh.6202
      @sadiejoh.6202 4 ปีที่แล้ว

      Never mind I figured out. Turned out my warp cords were off by a few points. Whoopsies.

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว

      Hmm, odd. Do you have some collision checking in there somewhere? If you can access the first warp, then it is probably something else in your game preventing you from reaching the second.

  • @meganbriskar7170
    @meganbriskar7170 5 หลายเดือนก่อน

    That worked perfectly fine well time to start coding for the other room now

  • @trexie15
    @trexie15 4 ปีที่แล้ว +3

    When i walk into the next room i spawn in the wrong side. Can you please help :)

    • @Pazmaz
      @Pazmaz 3 ปีที่แล้ว

      I'm having the same problem, have you found a solution?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว

      My suggestion is to use the debugger when you change rooms and follow your code. Something is moving you, but I can’t say what without seeing your project.

  • @fatyw7733
    @fatyw7733 4 ปีที่แล้ว +1

    thank you very much but when i go into the warp and i go to the other room my screen gets pressed can you help me with this??

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว

      Pressed? Like your screen distorts?
      That’s probably because you’ve got a camera and views in your rooms, and they’re not the same dimensions.
      When you use a camera, you’ve got to make sure your dimensions are in line with each other.

  • @juliannnnnn
    @juliannnnnn 6 ปีที่แล้ว +2

    Hey, i have a few issues;
    For one, the rooms merge, but one turns into a sort of picture, while the other the player can interact with.
    Another is that the player is cloned and leaves a trail of itself behind itself, sort of like a card when you win solitaire.
    It'd be great to know where i went wrong, thanks!

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  6 ปีที่แล้ว +1

      That is odd... Can you export your project and email it to me at beyondusgames@gmail.com? I'll look at it.

    • @Zazour48km
      @Zazour48km 2 ปีที่แล้ว

      @@LetsLearnThisTogether hello can you please explain I have the same issue

    • @flankempire5572
      @flankempire5572 ปีที่แล้ว

      For the second problem it is possible the background is missing

  • @Simkets
    @Simkets 3 ปีที่แล้ว +2

    Oh god, I've spent two hours trying to figure out why the X and Y doesn't work. Instead of teleporting the player to the X and Y positions, the player is appearing in room 2 in the same position where the warp object is located in room 1. I haven't found the issue (yet), but I'm already exhausted. If I'll figure it out, I'll make sure to edit this comment so others can see it in case they encounter the same problem.

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว +1

      If you want, you can send me your project and I’ll take a look at it. Email me at aaron@letslearnthistogether.com

    • @Simkets
      @Simkets 3 ปีที่แล้ว

      @@LetsLearnThisTogether Phew! Haha, thank you for the offer. I haven't figured out why your code doesn't work, so I have instead created more complicated system xDD
      I've created a persistent object that checks for the player:
      //-----Check for player
      if (instance_exists(obj_player)) {
      instance_destroy(obj_player)
      instance_create_depth(255, 45, 99, obj_player)
      }
      else if (!instance_exists(obj_player)) {
      instance_create_depth(255, 465, 99, obj_player)
      }
      //if instance_exists(obj) then delete instance and create new one
      //else !instance_exists(obj) then just create new one
      Player is not persistent. So, since the player doesn't exist in the second room, when he enters the second room, it spawns him at the coordinates I want him to spawn. And, since he already exists in the first room, when he comes back, it deletes him and spawns him at different coordinates.
      It works with what I want to do. Just a heads up for anyone who might be reading this. If you have a third room, fourth room, etc., it will always spawn the player at the same X and Y coordinates as in room 2. So, this only works if you have two rooms.
      However, you might be able to create another object that destroys the player check object and overrides it with its code. :D

    • @Darthrare
      @Darthrare 2 ปีที่แล้ว

      @@LetsLearnThisTogether this is my same issue with mine. I thought I was going crazy, but then I downloaded your project and it happens there also. I'm using GMS2 and I think the version of GM is the issue. 😞

    • @Darthrare
      @Darthrare 2 ปีที่แล้ว

      I freaking got it. Although I saw your comment that a new version of this tutorial was available I noticed that the warp object had to be persistent for the coordinates to be set to the player object. Thanks a bunch anyway 🙂

  • @egosactorco
    @egosactorco 6 ปีที่แล้ว +1

    Hey, I'm not sure if you have another video covering similar stuff but I was wondering how to have the screen fade to black when you hit a warp block then fade back in when you enter the next room.

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  6 ปีที่แล้ว

      It appears I don't, although it's on my list to do very soon.
      What you can try though, is basically creating an object that's black and fills up your entire screen. Make it transparent at first, then decrease its transparency slowly when you hit the warp, and reverse on the other side.

    • @egosactorco
      @egosactorco 6 ปีที่แล้ว

      Beyond Us Games ok I’ll give that a try, if it’s not too much to ask do you know if there’s like a command or something to use when dealing with transparency ?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  6 ปีที่แล้ว

      Yeah, it's image_alpha.
      docs2.yoyogames.com/index.html?page=source%2F_build%2Findex.html

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  6 ปีที่แล้ว

      And I just put a video about it: th-cam.com/video/z_SYGyLegb0/w-d-xo.html

  • @escarabajomayih
    @escarabajomayih 5 ปีที่แล้ว +1

    thank you, easy to understand, speedy, you are the best.
    gracias, fácil, rápido.
    eres el mejor, es lo que uno busca, tutoriales rápidos y fáciles de entender.

  • @epithayadarcithia2117
    @epithayadarcithia2117 4 ปีที่แล้ว +8

    could you make a tutorial for how to put a cooldown on the warps? that sounds great

    • @whatscookinbeats
      @whatscookinbeats 3 ปีที่แล้ว +2

      Just use an alarm, set the alarm value and call it when colliding.

  • @Mac_DeMarten
    @Mac_DeMarten 2 ปีที่แล้ว

    I have a problem at 3:46, if I write " var targetroom, targetX, targetY; " then it gives me yellow triangle and says " variable targetY only referenced once " what does that mean?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  2 ปีที่แล้ว +1

      Var is a keyword that creates a local variable, only usable in that event. Go ahead and remove it.
      The warning sign means it hasn’t been used anywhere else, and if you see this outside of a create event you’ve probably got a typo.

  • @LightniteProductions
    @LightniteProductions 5 ปีที่แล้ว +1

    But how do you make a transition in the menu like the splash screen of Undertale or the starting where it talks about the story itself? It has a slight transition where it moves to a black screen and then to the main menu for the splash screen and the next part of the story for the story part! I want to learn how to do that!! In other words, how do you make transitions without even moving a character? Like a timer that transitions you to the next scene! WITHOUT the character of course!

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว +2

      It sounds like what you want is a cutscene, where things happen on their own, or in a specific sequence you've laid out. The best way to do this is up for debate, but a simple way is to make a variable and set it to 0 (call it whatever), and in your step event have a series of switch statements or ifs, that do something at each increase of the variable. Such as:
      if (variable == 0) {
      //code to create a black rectangle over the screen
      ++variable
      }
      if(variable == 1) {
      ///draw text to the screen for a while, when done, increase variable again.
      }
      And so on and so forth.

  • @therealmrsketch
    @therealmrsketch ปีที่แล้ว

    Question, How would I keep the player's initial position before the teleportation? I am using the teleporter as a barrier which leads to the next room, and I want to keep some position depending on if the barrier is on the x axis or the y axis

  • @supersayan6318
    @supersayan6318 ปีที่แล้ว

    I tried this, it works, but even though I specified the targetX and targetY, it doesn't set them in the next room.

    • @StretchyMask
      @StretchyMask 11 หลายเดือนก่อน

      You have to make sure the player isnt moving.
      // Check for collision with o_warp
      if (place_meeting(x + hspeed, y, o_warp)) || (place_meeting(x, y + vspeed, o_warp)) {
      // If colliding with o_warp, stop movement
      hspeed = 0;
      vspeed = 0;
      }
      the place_meeting will stop the player movement coordinates and it should teleport them to targetX and targetY now.

  • @LargePotatooooo
    @LargePotatooooo 7 หลายเดือนก่อน

    this is still great even 7 full years later

  • @riviloo
    @riviloo 2 ปีที่แล้ว +1

    my player gets stuck when walking in the warp and doesnt warp? im so confused

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  2 ปีที่แล้ว

      Check out the updated version. I try to address all the possible mistakes you can make.

  • @vrtexxradiation
    @vrtexxradiation ปีที่แล้ว

    this is a great tutorial but the thing is in the creation code when I warp to rooms, the player is set to the area where the warp is and doesnt use target_x and target_y. please help.

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  ปีที่แล้ว

      Typically this is because after you run into the warp you’re still allowing the player to move, and that move logic actually runs off the old x and y of the player, not the new one. What I’d suggest is when you run into the warp, pause all input from the player, move and warp, and then resume input. Typically that kind of logic is controlled by a state machine.

    • @vrtexxradiation
      @vrtexxradiation ปีที่แล้ว

      @@LetsLearnThisTogether can you show me an example?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  ปีที่แล้ว

      @vrtexxradiation
      //code when you hit warp
      cantMove = true
      //in your movement code
      if (cantMove == false) {
      //regular code for movement
      }
      //start of new room
      cantMove = false
      That’s as simple as you can get. You can’t move when you begin warping and you can move any other time.

    • @vrtexxradiation
      @vrtexxradiation ปีที่แล้ว

      @@LetsLearnThisTogether ah thanks

  • @mrdigao001
    @mrdigao001 4 ปีที่แล้ว +1

    Very nice video! Thanks for your tips...

  • @tiagoorevoltado2273
    @tiagoorevoltado2273 5 ปีที่แล้ว +2

    hi when I write var targetRoom, targetX, targetY; in the war, this menssage happending variable target Y reference only reference once with a this signal (!) what i do?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว

      That means you've got it spelled differently somehow and aren't referencing it more than one time, which you probably need to be doing.
      So double check your spelling on all of it.

    • @BlueDetective2000
      @BlueDetective2000 4 ปีที่แล้ว +1

      @@LetsLearnThisTogether it does not work

  • @midwestvalues
    @midwestvalues 4 ปีที่แล้ว +1

    So, in trying this I'm able to get the player to swap rooms, however if I set the player Object to persistent, it switches rooms, but doesn't change the X Y Coords, leaving the obj where the tp was in the prior room. However if I turn player persistence off, it tp's them to the correct coordinates, but I cannot see the player for obvious reasons. Any ideas why persistence may be blocking changing my players x and y coords?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว

      Persistence doesn’t affect x and y, it must be something else. It may be that you’re setting x and y when the player enters any room, or something else is moving them back. Put a breakpoint on when the player moves room and go through your code, you’ll find something that moves them. Or perhaps you have another player object already in that new room

    • @midwestvalues
      @midwestvalues 4 ปีที่แล้ว

      @@LetsLearnThisTogether I think I figured it out. I believe my order was messed up. I now have an alarm trigger when the player hits the collider, a var stops the player from being able to move, the screen fades to black, sets the coords, swaps the room, black fades away and then the playermove var resets. Pretty seamlessly I may add! Great tutorial and honestly crazy that you respond to comments. Thank you!

  • @phandoumas2921
    @phandoumas2921 6 หลายเดือนก่อน

    i know its a bit old... but whe ni try to warp to second room, it dont takes tagetx and Y position, im getting teleportete somewhere "outside"

  • @alex.9027
    @alex.9027 6 ปีที่แล้ว +2

    Thanks you! It helps me a lot

  • @fabianorodrigues6131
    @fabianorodrigues6131 4 ปีที่แล้ว +1

    Thanks!!! work perfect!!!

  • @LiamADHD
    @LiamADHD 2 ปีที่แล้ว

    Hello, I have done this twice and typed word for word, ive also used other ways to port into the room but EVERYTIME he ports to the same place, can you help? nothing will override the location he gets ported too everything, and i never set anything up. is it a room setting? he is appearing the same place he is in the first room, so its like he is only switching rooms and not porting, thanks

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  2 ปีที่แล้ว

      If you export your project and email it to me, or share the link with me, I’ll take a look. aaron@letslearnthistogether.com

  • @Napstaar
    @Napstaar 3 ปีที่แล้ว

    MY BRANE ! .....WORTH IT !

  • @Ramiel981
    @Ramiel981 7 ปีที่แล้ว +2

    Hello! Loved the tutorial and subscribed, looking forward to checking out the rest of your content. However I am having a bit of an issue getting it to work correctly. When my player object hits the warp the room changes but I'm unable to see my player object in the new room. I'm fairly certain it's actually there because if I press up as if to back my player up into the return warp it transitions me back to the previous room. I only have 2 layers (Instances and backgrounds).

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  7 ปีที่แล้ว

      +Ikari Well then, that's odd. It sounds as though your player's visible variable gets set to false when you go through the warp, but that seems unlikely.. Why don't you export the project and email it to me Aaron Craig. I always enjoy finding unique bugs.

    • @Ramiel981
      @Ramiel981 7 ปีที่แล้ว +1

      Thanks! I've sent the email over to beyondusgames@gmail.com. It's probably something really minor and silly that I've missed so I apologise in advance.

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  7 ปีที่แล้ว

      +Ikari No worries. I'll get back to you soon.

    • @Ramiel981
      @Ramiel981 7 ปีที่แล้ว

      Just incase anyone else runs into the same issue somehow, the depth of my layers were out of whack so give them a look! Thanks again, Beyond, much appreciated!

  • @bibee1633
    @bibee1633 7 ปีที่แล้ว +1

    I got some problem here, it seem that my player go to another room but I can't see it in the new room however if I walk to the warp I can go back to the first room and I can see my player again. I don't know what happen :((

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  7 ปีที่แล้ว

      +BB.P Wongchanglor What can't you see in the new room? Your player? The warp?

    • @bibee1633
      @bibee1633 7 ปีที่แล้ว

      My player. seems like it invincible in that room

    • @bibee1633
      @bibee1633 7 ปีที่แล้ว +1

      I can fix it now. It just have some problem with my Tile set. Thx :)

  • @liawu4789
    @liawu4789 10 หลายเดือนก่อน

    Very helpful! Thank you so much 🎉❤

  • @grimjwo
    @grimjwo 3 ปีที่แล้ว

    Hi ! I don't know why but even if i select my oPlayer to persistent he's not here in the nextroom ! Help please !

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว

      If you’ve marked persistent, he’s there. But he may be off screen or hidden behind a layer. If you know the debugger, run that and check his depth in both rooms.
      If you don’t know the debugger, add a debug_message function in your player and have them write out their depth and then compare to the layers in both rooms. My guess is you have a background layer your player is moving to, hidden behind it

    • @grimjwo
      @grimjwo 3 ปีที่แล้ว

      @@LetsLearnThisTogether Yes the object appear ! but even if i choose the X and Y location it always appear in the same place ... then it fall in the void. What to do ?

  • @JayDeeWagwan
    @JayDeeWagwan 8 หลายเดือนก่อน

    ive copied this video so many times but for some reason it wont let me spawn on the x and y, anyone know why?

  • @kirstenlspringer
    @kirstenlspringer 3 ปีที่แล้ว

    I downloaded your finished project and Sara disappears when the room transitions and I'm not sure how to fix that.

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว

      Check out my updated video on room transitions, I try to cover a bunch of the common bugs.

  • @rubiospiojos
    @rubiospiojos 8 หลายเดือนก่อน

    Lots of thanks!

  • @ZombifiedGT
    @ZombifiedGT ปีที่แล้ว

    i have tried several tuts and none work, i followed everything but whenever i touch the warp part, it just freezes my game ( it gets stuck in its current position and like completely freezes )

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  ปีที่แล้ว

      If it freezes, do you have to force close the application (just pressing x doesn’t work)? If so, you’re in an endless loop somehow. This could be by an actual while loop, or by warping your one room and immediately warping back to another, and doing this endlessly.
      Try starting by just having a warp in 1 room to another, without anything in that new room.

  • @thenoseguy
    @thenoseguy 3 ปีที่แล้ว

    When I collide with something else while I'm colliding with the teleport, it doesn't move my character properly and keeps its position the same while teleporting to the other room. What do I do?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว

      It sounds like you’ve got some extra code beyond mine interfering with the teleporting. Colliding with another instance shouldn’t mess up warping, so double check your code against mine to see if you can spot a difference.

    • @thenoseguy
      @thenoseguy 3 ปีที่แล้ว +1

      @@LetsLearnThisTogether I'll mess around with it a bit and see what I can find.

  • @justinsmith3940
    @justinsmith3940 5 ปีที่แล้ว

    PLEASE HELP.... I did the warp like he said and made sure my player is on persistent. When I go into the next my player doesn't appear. if I try to move back to the warp it puts me back to the original room?????? I don't know what to do?????

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว

      Your player is still there. Sounds like in the other room, your instance later is below tiles or something else, so make sure those are in the correct order.

    • @justinsmith3940
      @justinsmith3940 5 ปีที่แล้ว

      I thought the same thing but it is a new room and it only has background and the instances it starts with (GAMEMAKER STUDIO 2). I sent yoyo games a message and even my project to show them. I even have a TEST project aside from my main project and it does the same thing. I don't know??? Got any other ideas? I thought about doing a instance create inside the instance of the warp. Also, thank you for your time in helping me with this.

    • @justinsmith3940
      @justinsmith3940 5 ปีที่แล้ว

      Also, the player is in the first layer in my room in the original room (room1 to room2)

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว

      Go ahead and upload your project to a cloud service and send me the link here.

    • @justinsmith3940
      @justinsmith3940 5 ปีที่แล้ว

      1drv.ms/u/s!An_eZrW1_MBRgYF_nV94169e5E526g

  • @がむがむ-g4v
    @がむがむ-g4v 4 ปีที่แล้ว

    Thank you so much! This is so good video😳 I have a one question.
    I can change room this object.
    But this one is indicated under the map tips next room. How do this problem resolve?😢

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว

      Hey,
      Not totally sure what you’re asking. Are your characters disappearing when you change rooms?
      If so, check the depth on your instances later between rooms, as if they’re different, then problems can happen.

    • @がむがむ-g4v
      @がむがむ-g4v 4 ปีที่แล้ว

      Beyond Us Games Thank you so much reply😢 English is difficult🤪
      Thanks to you I could resolve this problem😢

  • @gabrielerizzo6695
    @gabrielerizzo6695 2 ปีที่แล้ว

    Probably none will reply.
    There is a method to set the targetX and targetY to a precise instance? I mean, the problemi with the solution of the video is that if I wanted to move the portal I have to change the position of the respawn everytime. Can I link two portal in which doesn't matter where I put theme they are always linked? Or is it impossible

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  2 ปีที่แล้ว

      Do you mean 2 portals in the same room? In that case, you could, yes. A little bit of work, but you could use instance_find to find the other portal, and then set the ID to that.
      If it’s another room, that’s much more difficult. You can, but you’ll need to go into that room, save it’s ID in a file, and then read that file and get the info and put it in the other warp. Not super easy, but possible.

  • @dmac2016
    @dmac2016 4 ปีที่แล้ว

    Hmm. I did everything right and the collision won't work. For example, when I run into the warp, nothing happens. Doesn't even have collision. Solutions?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว

      Check out my newest collision video with a similar name. It covers issues like this more thoroughly. The problem is probably from both of your objects being marked as solid. Uncheck that and try it.

    • @dmac2016
      @dmac2016 4 ปีที่แล้ว

      Which video is it?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว

      GameMaker Studio 2.3 - Creating & Changing Rooms, my last upload.

  • @MalligatorXD
    @MalligatorXD 6 ปีที่แล้ว +1

    super easy to follow. thank you!

  • @raidoukuzunoha9874
    @raidoukuzunoha9874 4 ปีที่แล้ว

    i made 2 gates - one gate from level0 to level1, one gate from level0 to level2 but the level0 to level2 gate didnt work, it juz pause the game and the coding looks the same, only the destination n room target are different right? wut did i missed here?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว +1

      That’s odd. If it pauses the game then you may be stuck in a loop from moving from one room to the next, because you set the coordinates on the gates. Make sure you’re spawning not on a gate.

    • @raidoukuzunoha9874
      @raidoukuzunoha9874 4 ปีที่แล้ว

      Beyond Us Games it seems that its not a pause but a crash. Idk wut happened here but i delete the room n duplicate level1 to be level2 as the gate level0 to level1 worked. But ididnt think about theres possibilities of having that loop. Ill try see to that if im makin the next level. I hope thats the case.

  • @joeycrisp3738
    @joeycrisp3738 6 ปีที่แล้ว +2

    you are the man. thank you

  • @aaronwise1089
    @aaronwise1089 7 ปีที่แล้ว +1

    Sweet I wish I had known this method earlier

  • @sumbudi2734
    @sumbudi2734 4 ปีที่แล้ว

    it changes the room but doesn't take over the new coordinates, already thought of using global variables... some help?

    • @sumbudi2734
      @sumbudi2734 4 ปีที่แล้ว

      btw great tutorial keep it up :D

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว +1

      Check out my updated tutorial of changing rooms. It addresses some of the common problems like you’re encountering.

  • @videomaker648
    @videomaker648 ปีที่แล้ว

    How can i make the music from room 1 stop and then room 2 music begins to play?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  ปีที่แล้ว

      Music is different because once it starts it will continue running without an object. This means you really need a persistent object to keep track of your music. In the room star event, you can check which room you’re in and stop and start music as needed in there.

  • @Willp646
    @Willp646 3 ปีที่แล้ว

    Thanks for the video! It really helped! But one thing, when the player transitions rooms, it goes to the coordinates of the previous warp point, just on the new room. I dont get any errors, and I've checked the code a few times now, could you help me out?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว

      Check out my updated version of this video that covers some common issues.
      I’m not quite sure what your issue is, it sounds kind of unique.
      So you’re saying you hit a warp block and it moves you but it moves you to the coordinates of a totally different warp block?

    • @Willp646
      @Willp646 3 ปีที่แล้ว

      Alright, I’ll check out the video, and if I still get the problem I’ll come back and let you know!

    • @pnkkprl
      @pnkkprl 3 ปีที่แล้ว

      @@Willp646 hey did you solve it?

  • @1lipefellipe266
    @1lipefellipe266 4 ปีที่แล้ว +1

    Thank youuuu
    I love you

  • @raidoukuzunoha9874
    @raidoukuzunoha9874 4 ปีที่แล้ว

    how about using the pos x and pox y of that warp but juz plus some distance like posX -= 50, posY = 0 as the warp position

  • @Washed0n3
    @Washed0n3 2 ปีที่แล้ว

    i have an issue where it just teleports me to like a black and white version of the start of the level

  • @EBarSays
    @EBarSays 7 ปีที่แล้ว +2

    Thanks for this.

  • @penguindev4474
    @penguindev4474 2 ปีที่แล้ว

    I made it so that you have to click this icon instead of touching the warp because my game only has 2 rooms, but for some reason, even if my character is on persistent, when i teleport to the room he doesn't appear, i tried making the warp collision based but the player still doesn't show up, does anyone know what is happening?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  2 ปีที่แล้ว

      First determine if the player is transferring or not by using the debugger. You can use it to see if the object does move to the new room. If not, you may have a bug. If it does move to the new room, then check depth and drawing objects as you’ve probably got your player behind something in your new room.

    • @penguindev4474
      @penguindev4474 2 ปีที่แล้ว +1

      @@LetsLearnThisTogether I put in the wrong x and y positions i accidently mixed up the x and y, so i was stuck in a wall in the corner and i didn't see the player i fixed it though

  • @Dandagr
    @Dandagr 4 ปีที่แล้ว +1

    AWESOME!!!!!

  • @SpiderMan-b1n
    @SpiderMan-b1n 29 วันที่ผ่านมา

    can you plz make a tutorial to change waves in a survival game? i tried editing code & i gave up (also I just realized this was made 7 years ago)

  • @alexgoldendragon3435
    @alexgoldendragon3435 ปีที่แล้ว +1

    great tutorial even for new generations like mine :D

  • @justinsmith3940
    @justinsmith3940 5 ปีที่แล้ว

    I am in game maker studio 2 and when I transition to a room then come back to my original room the non persistanct objects do not load. How do I make the non persistanct objects load again so my room looks the same when I go back into it????

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว

      That's a strange issue. Are you deleting those objects before you leave? A persistent room should stay the same when you leave and come back. If you want the room to totally reset each time you enter, make sure the room isn't persistent.

  • @Levideosnet
    @Levideosnet 3 ปีที่แล้ว

    hi, do u have some tutorial to change levels in Drag and drop?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว

      Look for the code block, room go to and then type in the name of your room

  • @vitinho5089
    @vitinho5089 4 ปีที่แล้ว +1

    Thanks for video bro you save my game lol

  • @danielbrijder8025
    @danielbrijder8025 5 ปีที่แล้ว

    Nice tutorial but my character disappears after he walked into the warp. The screen does switch to another room. And how do I make the warp object invisable?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว

      Is your character persistent?
      And if you uncheck visible on the warp object it will be hidden in the game.

    • @danielbrijder8025
      @danielbrijder8025 5 ปีที่แล้ว

      @@LetsLearnThisTogether Yeah. When I go from room 1 to room 2, it works, but when I go from room 2 to room 1, my character disappears.

    • @danielbrijder8025
      @danielbrijder8025 5 ปีที่แล้ว

      Btw, it only works when I put the character object in the second room, my character will teleport to the objects location instead of correct X and Y.

    • @danielbrijder8025
      @danielbrijder8025 5 ปีที่แล้ว

      @@LetsLearnThisTogether Could you please still help?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว

      Upload your project somewhere and send me a link to it, I'll take a look.

  • @borzageorgemarian4924
    @borzageorgemarian4924 6 ปีที่แล้ว

    Hi i have a problem , i did the tutorial , it worked and i thank you for making the video , but i made an menu , at the start and now i freezes evry time i hit new game if in the room i want to start are any teleporters, why did that happend?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  6 ปีที่แล้ว

      The only reason I can think it would freeze is if you’ve got a loop of teleporting between rooms. Such that you start in room a, then immediately get teleported to room b, and then immediately back to a, and so on.
      Check where you’re teleporting and make sure that’s not happening.

  • @treyvonbryant3538
    @treyvonbryant3538 7 ปีที่แล้ว +1

    How to make new landscapes for different levels?

  • @comajuice
    @comajuice 6 ปีที่แล้ว

    hey, ive never had this issue in the past but now room1 overlaps room0 when i warp. Room0 doesnt disappear, it just stays in the background while my new room is in the corner. How can i fix this?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  6 ปีที่แล้ว

      That’s very strange. So you’re in 2 rooms at once?

    • @comajuice
      @comajuice 6 ปีที่แล้ว

      @@LetsLearnThisTogether yeah basically? The only way I could fix this was by using a camera/viewpoint, making the screen zoom in so much you only see that room.

  • @michaelmatthews3058
    @michaelmatthews3058 3 ปีที่แล้ว

    Great video! but it warps my character to the same x and y positions as the previous room, not sure why :(

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  3 ปีที่แล้ว

      Could be a lot of different reasons. Do you have your character in both rooms? Are you setting their positions immediately or after a delay? And if there’s a delay, is the warp object set to persistent? Is there code in your player to move them when they change rooms?

    • @michaelmatthews3058
      @michaelmatthews3058 3 ปีที่แล้ว +1

      @@LetsLearnThisTogether just tried a few things, starting to work! Thanks for the response tho

  • @xcalicojack
    @xcalicojack 10 หลายเดือนก่อน

    i dont think this code works in the newer versions of GML. i copied everything exaclty and it keeps saying the variables are unset and trying to walking into the warp tile just crashes the game.

  • @KBeatStudios
    @KBeatStudios 4 ปีที่แล้ว

    the warp works but they arent warped to the right coordinates, also i keep getting "targetY only referenced once" despite it being used as told. thank you!

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว

      If you’re only referencing it once, then there must be a typo somewhere. If you are getting them both then you should end up at the right spot.

  • @puteridiyana94
    @puteridiyana94 6 ปีที่แล้ว

    nice video bruh. but i have some problem. the code seem work but when i try run it. my player enter the other room but i cant see my player. invisible. i dont know where my player go n cant go back to the main room. can u help me?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  6 ปีที่แล้ว

      Is your player marked as persistent? If not they won't be taken to the other room.
      If they are persistent, you need to check your room layers, as your player could be on a layer lower than the visible lower, causing your player to act invisible.

  • @dmac2016
    @dmac2016 4 ปีที่แล้ว +1

    It worked but after going to the second room, I can't go back to the first room.

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  4 ปีที่แล้ว

      This is a common issue. The most likely problem is that when you try to go back to the first room it warps you onto the warp in the first room, which then takes you right back to the second room. Try moving the warps around and see if that helps.

    • @EvalenaEggnog
      @EvalenaEggnog ปีที่แล้ว

      @@LetsLearnThisTogether Hi i'm also having this issue, even when I delete the warp panel from the second room, I keep getting the error when i move back to where I warped from "ERROR in
      action number 1
      of Step EventobPlayerOrange
      for object ObjWarp:
      Variable ObjWarp.targetRoom(100003, -2147483648) not set before reading it.
      at gml_Object_ObjWarp_Collision_ObMotherGoblin (line 3) - room_goto(targetRoom);
      ############################################################################################
      gml_Object_ObjWarp_Collision_ObMotherGoblin (line 3)"

  • @듀크론
    @듀크론 7 ปีที่แล้ว +1

    I enjoyed this video so much. Thank you. By the way, when I run mine, a fatal error happens. Could you fix it?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  7 ปีที่แล้ว

      +홍영준 If you post it here, I can give you some help. Also look through the other comments to see if it's the same fatal error, because if so the answer is in there.

    • @듀크론
      @듀크론 7 ปีที่แล้ว

      How can I send it to you?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  7 ปีที่แล้ว

      +홍영준 Copy and paste the entire error and place it here, in the comments. Then everyone else can also see the solution I post to it.

    • @듀크론
      @듀크론 7 ปีที่แล้ว

      ############################################################################################
      FATAL ERROR in
      action number 1
      of Step Eventobj_player
      for object obj_warp:Variable obj_warp.targetRoom(100002, -2147483648) not set before reading it.
      at gml_Object_obj_warp_Collision_9b2920bb_717d_403f_94d2_22d2301fddd7 (line 6) - room_goto(targetRoom);
      ############################################################################################But if I just delete warp object in the destination room, it works properly. Without any error!!

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  7 ปีที่แล้ว

      +홍영준 So when a variable isn't set, it means that you're trying to access it before giving it a value. I've seen this specific problem before. Check the warp block in the destination room and check its creation code. Are the values set in there?
      What can happen is you warp to the new room, instantly hit that warp block, and it tries to warp you back to the other room but its variables haven't been set yet.

  • @MichelleMoonknight
    @MichelleMoonknight 5 ปีที่แล้ว

    Hi, when I step into warp it says the line5 in collision with player and warp in line5 - objPlayer.x = targetX is wrong. what am I supposed to do?

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  5 ปีที่แล้ว +1

      Can you post the actual error?

    • @MichelleMoonknight
      @MichelleMoonknight 5 ปีที่แล้ว +1

      It works I just accidentaly ticked the "flip X" so It didn't worked. My bad but great tutorial indeed

  • @auroracalagomez
    @auroracalagomez 8 หลายเดือนก่อน

    I have a problem with the sound when my character touchs the object

  • @remdem622
    @remdem622 7 ปีที่แล้ว

    great video as always beyond us games! I was wondering if you could a video of how to fade in and fade out between rooms, thanks!

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  7 ปีที่แล้ว

      +Ezra Holladay Thanks. Yeah, that's something I can do.
      There are some good tutorials out there on it, in the meantime. It's essentially creating an object the size of the room that's just black, and then changing its alpha value slowly over time to become transparent, if you wanted to try it out on your own.

    • @remdem622
      @remdem622 7 ปีที่แล้ว +1

      thanks beyond us games! i'll try to do what you said to!

  • @miguelgarcia-yn8mn
    @miguelgarcia-yn8mn 6 ปีที่แล้ว

    Thank you, I would like to know if you could make a video where you click on an icon or button and go to the next room or other room, thank you for the video awesome help, thanks for your wisdom.

    • @LetsLearnThisTogether
      @LetsLearnThisTogether  6 ปีที่แล้ว

      Certainly could, but all you need for that is to put the same code we have used in this video, and just add it in a mouse clicked event for that icon or object.

    • @miguelgarcia-yn8mn
      @miguelgarcia-yn8mn 6 ปีที่แล้ว +1

      Thank you

  • @nikitachadyuk5393
    @nikitachadyuk5393 7 ปีที่แล้ว +2

    Straight to the point. Love it.