Switches And Doors

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 27

  • @Cloveredz
    @Cloveredz 2 місяці тому

    man, i thought this tutorial would work after 6 years

  • @emilkummerfeldt9836
    @emilkummerfeldt9836 3 роки тому +1

    good video, everything works. simple tutorial, everything's good! but, if i want the switch the open a door in another room, what would i than have to do?

    • @GameMakerCasts
      @GameMakerCasts  3 роки тому +1

      You would need to store a true/false value in a global variable, example: global.is_door_a_open = false; then you check that variable in the next room. All global variables can be accessed throughout your game no matter what room it is in. does that help?

    • @emilkummerfeldt9836
      @emilkummerfeldt9836 3 роки тому +1

      @@GameMakerCasts idk what that means.. sry, I'm new at cooding. What codes should i do, and where should i code them (in what object and event)

    • @emilkummerfeldt9836
      @emilkummerfeldt9836 3 роки тому +1

      @@GameMakerCasts Idk what that means, what code do i have to do? what object and event? (if even object and/or event) i need know fast, it's gonna be a birthday gift. i only have a few days left. can you help me?

    • @emilkummerfeldt9836
      @emilkummerfeldt9836 3 роки тому +1

      it's my last day and i want to finish can you help me please?

  • @emilkummerfeldt9836
    @emilkummerfeldt9836 3 роки тому +1

    if i want the switch to open a door on another room, what do i do then?

  • @sheeplavender3261
    @sheeplavender3261 5 років тому +1

    how to do create combinations so that if the switches are in the right combo they will activate the door?

    • @GameMakerCasts
      @GameMakerCasts  5 років тому +1

      Sorry haven't been ignoring. There is a few things you can do depending on how you want it done. I will add it to my list of videos to create! :) But if you dont' care about the switches that are "off" you could create a few variables (like switch_a, switch_b, switch_c) and have them need to be set to true before the door opens (true meaning they stepped on the switch or whatever)... make sense? if not give me a few days :D

    • @sheeplavender3261
      @sheeplavender3261 5 років тому

      @@GameMakerCasts
      I'm doing levers. So basically the player can flick the levers up or down. levers must be flipped in the correct direction in order to trigger the door

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

      So what I have made is a small system like this imgur.com/Fw80Y3d It supports multiple levers and just a few variables. I will get working on cleaning up the code and producing something for you :D

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

      @@sheeplavender3261 just an FYI putting up a video in a few days where i go over making an entire system for this :D

    • @sheeplavender3261
      @sheeplavender3261 5 років тому

      @@GameMakerCasts sweet thank you :)

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

    Hello! I have question. Everything work great but: when i dont see doors i cannot use switch, when i go and see door and back to the switch i can use switch. Whats happen?

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

      You would need to send me your code in order for me to have a look

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

    Hey! How can I close the door back if I pressed or collide with a switch?

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

      I'd have to watch my video again but basically the logic is that you want a boolean on the switch to say if the door is open or closed and then once the switch has been "toggled" you can toggle that on and off and that would connect up with the door. Does that make any sense at all?

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

      @@GameMakerCasts I've already did it 😀, thanks. Yeah you must create closing state and then check if the switch was triggered before and door is opened...if I press again going to closing state and remain in closed state.

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

      @@claudiuboy83 hi. you can give a code?

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

    please help me. ( i know this has to do with nothing, but please help me anyways i really need help, someone ) when i walk into a wall, i can only move up and down, but that's now even all, i can only move up and down if i face to the right and not the left. if i face to the left i cant move. if i face to the right i can only move up and down. please help me someone i beg you

    • @GameMakerCasts
      @GameMakerCasts  3 роки тому +1

      Are you using different sprites? Are you changing your image_xscale? If so, you need to ensure all sprites are using the same collision mask, and their origin are all at the same location. Another way to do the flipping is to use a variable (facing_direction) and that variable changes from 1 to -1. In the draw event you overwrite your own draw with a simple ( draw_sprite_ext(sprite_index, image_index, x, y, facing_direction, image_yscale, 0, c_white, 1); ). If you have discord you can pop on and we can chat there discord.gg/zHZ7TCcn

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

      @@GameMakerCasts thank you this helped me

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

    Hey. an excellent lesson! Thank you! Can you please tell how the animation of the switch is implemented at the moment when the player rises to it from above? At me a problem, in the project the player after several jumps on the switch - hangs up and it is impossible to move. Why is that?

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

      with the animation I understood everything. was not attentive =)
      But the hero is still stuck when trying to move. Through the switch the hero does not go right through. solid disconnected. The problem was in clashes with this object. I decided to do otherwise. Added a click on the switch through a separate key and the code from the hero collision entered in step

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

      Thanks for the reply. Have you added something to the project? I can hold down the space key for a full minute and continue to move in the sample project.

  • @Long-yo1di
    @Long-yo1di 4 роки тому

    can you give me a code from obj Solid, I don't know where?

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

      I believe from that time obj_Solid was just a placeholder, if you are looking for some basic platformer movement check out ua-cam.com/video/zPyOC1cRWeQ/v-deo.html