GM:S 1.4 In-game mirror?

Discussion in 'Programming' started by OQuixley, Sep 2, 2017.

  1. OQuixley

    OQuixley Member

    Joined:
    Jun 19, 2017
    Posts:
    17
    Hi all, I'm making a short side-scrolling horror game and I want to have a small part where the player walks past a mirror and their image is distorted (I have a sprite I want to use for the mirror image), but after the first time the mirror only displays the normal player sprite.

    I have no idea how to make a 'mirror' object in game, and the only things I can think of how to do it are wild and probably very time-consuming.

    If it helps, I am using a surface system to create simple lighting in my game, which I got from this tutorial with little modification: https://zackbellgames.com/2015/01/19/simple-lighting-surfaces/
     
  2. flyingsaucerinvasion

    flyingsaucerinvasion Member

    Joined:
    Jun 20, 2016
    Posts:
    2,163
    do you mean the player character is drawn differently, or that there is an additional image of them in the mirror?
     
  3. OQuixley

    OQuixley Member

    Joined:
    Jun 19, 2017
    Posts:
    17
    OK so basically the first time the player walks by the mirror it just uses a different sprite, then any time after that it just reflects the player as he is.
    The main issue is I don't know how to CREATE a mirror, to keep the sprite within the frame of it...
     
  4. Niels

    Niels Member

    Joined:
    Jun 22, 2016
    Posts:
    825
    Copying the player sprite and actually make the mirror a hole in the wall (make the wall a object). When the player has a place_meeting with the mirror it draws the players sprite with a slight offset and it's depth higher than the wall with mirror object
     

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