Home / Gaming Videos / GameMaker – Warp/Door Tutorial

GameMaker – Warp/Door Tutorial



PLEASE LIKE, COMMENT & SUBSCRIBE!
Learn how to make simple doors for use in RPGs, Platformers and more that take your character from room to room, using persistance and creation code.

For our complete game tutorial series, click here: http://bit.ly/1yK6XtF

YoYo RPG engine (Included sprites used in this video): http://bit.ly/Um1FBf

This channel is part of the Geekism Network, for more information on this and other channels visit http://www.geekism-network.com

— GameMaker: Studio
GameMaker: Studio by YoYo Games is a fantastic free software (with premium paid options) for creating video games in an easy to use workspace. Get it here: https://www.yoyogames.com/studio

— Music Credits:
“Jazzy Frenchy”, “Little Idea” – Bensound.com

Licensed under Creative Commons: By Attribution 3.0
http://creativecommons.org/licenses/by/3.0/

source

About freegameslab.com

Check Also

FIFA 18 Manchester United Career Mode Ep8 – JANUARY TRANSFER WINDOW!!

FIFA 18 Career Mode, every day!! Check out https://www.g2a.com/r/chesgames for cheap Xbox/PSN codes and PC …

36 comments

  1. Does anyone know how to do this but instead of colliding you press a button? I've tried the forums but I can't seem to create a post on there: they have no beginner tutorial. When my player goes through a door they don't end up where the creation code tells them to go but to the corner of the room. Yes, my character is persistent. Thanks.

  2. with the variables that get used when going through the door. it says that line 1 is not being read what could i do to fix that ?

  3. I'm having trouble applying this but for a 2D platform game. For example if I jump with the character and go to the next room he will appear on the floor.

    How can I make the character to make the transition between the room while maintaining the jump it? >. <

  4. For everyone with the obj_player.player_x not set before reading bug,
    make your obj_player persistent.
    You can do this by typing the following code into your obj_player Create Event:

    obj_player.persistent = true;

    Doing this will make your player object "remember" all of its variables.
    ! Do not place another player object anywhere else, only in your first room !

    Hope this helps.

  5. how do i fix it!? i try any possible variables.. someone help me..
    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Other Event: Room Start
    for object obj_lee:

    Variable obj_lee.player_x(100007, -2147483648) not set before reading it.
    at gml_Object_obj_lee_StartRoomEvent_1 (line 2) – x = player_x;
    ############################################################################################

  6. Thanks for this tutorial, it was real helpful. Took me a while to iron out the bugs that I ended up with. but I think I got it working

  7. No matter what I put into the creation code of the doors, the player will spawn at the same place in either room. (I.E, regardless of the coordinates I set, they will appear at a different set of coordinates that I cannot seem to change.) Could I please get some help?

  8. help ############################################################################################

  9. I dont know what to do

    ############################################################################################
    FATAL ERROR in
    action number 1
    of Step Event0
    for object obj_player:

    Variable obj_player.phy_position_y(55, -2147483648) not set before reading it.
    at gml_Object_obj_player_StepNormalEvent_1 (line 41) – phy_position_y += -spd;
    ############################################################################################

  10. when i move to the next room, i end up right where i put the door at and it ignores the x and y ENTIRELY pls halp

  11. Im' using a physic world and my caracter spawn in the second room where the last door was and not at player_x and player_y position. I don't know how to figured it out 🙁

  12. Help me !!!
    when I go to the new room my character doesn't spawn

  13. PLEASE HGELP

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Other Event: Room Start
    for object obj_player:

    Variable obj_player.player_x(100010, -2147483648) not set before reading it.
    at gml_Object_obj_player_StartRoomEvent_1 (line 1) – x = player_x;
    ############################################################################################

  14. Is it really important to run it in HTML5??

  15. Thanks. The tutorial is very helpful.

  16. I feel like I'm running into a wall. I want to make a door that the player opens with a key press but that doesn't lead into a new room. like if I had a whole house built, where you can already see all the rooms, but you need to open the doors to get inside them. But I can't find the right tutorials for that. all I really need is to shift an objects sprite and collision I think but I don't know the code for it. can anyone point me in the right direction here?

  17. now i got ANOTHER MESSAGE more halp please

    FATAL ERROR in
    action number 1
    of Step Event0
    for object obj_Player:

    Variable <unknown_object>.<unknown variable>(100036, -2147483648) not set before reading it.
    at gml_Object_obj_Player_StepNormalEvent_1 (line 50) – player_x = other.Target_x

  18. I get this message HALP
    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Other Event: Room Start
    for object obj_Player:

    Variable obj_Player.player_x(100017, -2147483648) not set before reading it.
    at gml_Object_obj_Player_StartRoomEvent_1 (line 1) – x = player_x;
    ############################################################################################

  19. Tried using this code for a game I'm working on, but I keep getting "Unable to find any instance for object index 0 name name of my character-object".

    I have an initial room where I put my controller-objects for doors and misc (had to separate controller for door since my doors kept disappearing if I only used one object to control everything).

    Room order is as follows:
    room_init (where I have my objects "obj_door" and "obj_controller", both persistent)
    room_ship (where my character is spawned.)

    I have tried to put him in the "room_init" but I still get the same error, so I don't know what I'm doing wrong.

  20. when i try to go to another room it shows me this
    ERROR in
    action number 1
    of Collision Event with object obj_door_ext
    for object obj_player:

    Error in code at line 1:
    player_x = other.target_x;
    ^
    at position 18: Unknown variable target_x

    pls help

  21. I know this is a relatively old video. But thanks so much! This really helped me!

  22. why this error

    _________________________________________
    FATAL ERROR in
    action number 1
    of Step Event0
    for object obj_zombie1LL:

    ############################################################################################
    VMError!! Occurred – Push :: Execution Error – Variable Get 0.y(1, 0)
    at gml_Script_scr_zombie_static (line 1) – var dis = point_distance(x,y,obj_karan.x,obj_karan.y);
    ############################################################################################
    Self Variables :
    aggroRange(100001) = 250
    state(100002) = 0
    alerted(100003) = 0
    z1Speed(100004) = 2
    hp(100014) = 100
    Global Variables :
    score(103) = 0
    health(105) = 100

  23. ############################################################################################
    FATAL ERROR in
    action number 1
    of Other Event: Room Start
    for object obj_player:

    Variable obj_player.player_x(100017, -2147483648) not set before reading it.
    at gml_Object_obj_player_StartRoomEvent_1 (line 1) – x = player_x;
    ############################################################################################

  24. +Making Games 101 (sorry if my english is bad, im brazilian) if i try to pass through the door an error screen appears, saying that i can't walk because i dindn't "set" the code "phy_position_x, please help me im doing this for a school project.

  25. ############################################################################################
    FATAL ERROR in
    action number 1
    of Other Event: Room Start
    for object obj_stat:

    Variable obj_stat.player_x(100006, -2147483648) not set before reading it.
    at gml_Object_obj_stat_StartRoomEvent_1 (line 1) – x = player_x;
    ############################################################################################

  26. _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Other Event: Room Start
    for object obj_player:

    Variable obj_player.player(100016, -2147483648) not set before reading it.
    at gml_Object_obj_player_StartRoomEvent_1 (line 1) – x = player.x
    ############################################################################################

    help!!!!

  27. I dont know if your looking at these comments anymore, but anyway this is the problem i have.

    FATAL ERROR in
    action number 1
    of Step Eventobj_door
    for object obj_player:

    Variable <unknown_object>.<unknown variable>(100013, -2147483648) not set before reading it.
    at gml_Object_obj_player_CollisionEvent_7_1 (line 3) – room_goto(other.targetRoom);
    ############################################################################################

  28. help
    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Other Event: Room Start
    for object obj_player:Variable obj_player.player_x(100003, -2147483648) not set before reading it.
     at gml_Object_obj_player_StartRoomEvent_1 (line 1) – x = player_x;
    ############################################################################################

  29. Hi I used the code in my game but I have some problems:
    1. If I parent the interior door to door, I will warp to the room by using door but I can't go back because interior door uses the creation code from door to spawn me in the exact same room, not previous one.
    2. If I will only use door without children objects the transition will work but only sometimes. These doors share the creation codes with each other and sometimes they pick the same room, sometimes the other.

    edit: I tried making create event for each and now child and parent work like in the problem 2 – they sometimes warp to other room, sometimes to the same one.

  30. PLZ help me
    Variable obj_player.player_x(100004, -2147483648) not set before reading it.
    at gml_Object_obj_player_StartRoomEvent_1 (line 1) – x = player_x;
    ############################################################################################

  31. Help please! 🙁 this error appears when I checked "persistent" box in obj_player D:
    If i don't check the "persistent" box, player does not appear in the next room 🙁
    is "phy_position" code not allowed when the object is "persistent"????

    _________________________________________
    ############################################################################################
    FATAL ERROR in
    action number 1
    of Step Event0
    for object obj_player:

    Variable obj_player.phy_position_y(55, -2147483648) not set before reading it.
    at gml_Object_obj_player_StepNormalEvent_1 (line 24) – phy_position_y -= 10;
    ############################################################################################

  32. When my character carries on to the next room, I'm unable to move…like all the properties (movement, shooting, etc.) were not carried on to the next room. The "Persistent" box is checked so I'm stumped. Any idea of how to fix this? Thanks!

  33. Anyone, help?FATAL ERROR in
    action number 1
    of Other Event: Room Start
    for object obj_crabwalk:Variable obj_crabwalk.player(100007, -2147483648) not set before reading it.
     at gml_Object_obj_crabwalk_StartRoomEvent_1 (line 1) – x = player.x;

  34. How would you do this is you did have a title screen? It won't detect the player and therefore won't run.

  35. This is so helpful! Thanks so much!

sfsdf