Help with instance change

Discussion in 'Programming' started by Vincent, Aug 3, 2016.

  1. Vincent

    Vincent Member

    Joined:
    Aug 2, 2016
    Posts:
    59
    In my platform game, you have to move from rm_1 to rm_2 using stairs. That works fine. But when You return from rm_2 to rm_1, I want the object to appear in the stairs, not in the start of the level. How do I do it?

    Code:
    if (place_meeting (x, y+1, obj_barrier)) //obj_barrier teleports you
    and (room == rm_2)
    {
    room_goto (rm_1)
    //There i want to move the rm_1 instance to the stairs
    }
     
  2. Vincent

    Vincent Member

    Joined:
    Aug 2, 2016
    Posts:
    59
    I tried using
    instance_destroy ()
    instance_create (x, y, obj)
    but it doesen't work
     
  3. jazzzar

    jazzzar Member

    Joined:
    Jun 29, 2016
    Posts:
    514
    If you're moving between rooms, simply put the player on the stairs in level editor
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice